Question

Help me write UPM script

  • 23 December 2018
  • 1 reply
  • 1434 views

Hi!

Help me write simple UPM script.
I need what script do next:

If link on port 25 down, script do next command:
conf vlan VLANNAME del po 25
conf vlan VLANNAME add po 29 tag

If link on port 25 is up then:
conf vlan VLANNAME del po 29
conf vlan VLANNAME add po 25 tag


EXOS 12.6.5.2 patch1-3

1 reply

Userlevel 7
Hi,

this is a simple UPM script that goes like that:

code:
create upm profile MyUPMProfile

enable cli scripting

IF (!$MATCH($EVENT.LOG_COMPONENT_SUBCOMPONENT,vlan.msgs) && !$MATCH($EVENT.LOG_EVENT,portLinkStateDown)) THEN
IF (!$MATCH($EVENT.LOG_PARAM_0,25)) THEN
config vlan VLANNAME del port 25
config vlan VLANNAME add port 29 tag
ENDIF
ELSE
IF (!$MATCH($EVENT.LOG_COMPONENT_SUBCOMPONENT,vlan.msgs) && !$MATCH($EVENT.LOG_EVENT,portLinkStateUp)) THEN
IF (!$MATCH($EVENT.LOG_PARAM_0,25)) THEN
config vlan VLANNAME del port 29
config vlan VLANNAME add port 25 tag
ENDIF
ENDIF
ENDIF

.

create log filter MyLogFilter
configure log filter MyLogFilter add event vlan.msgs.portLinkStateDown
configure log filter MyLogFilter add event vlan.msgs.portLinkStateUp

create log target upm MyUPMProfile
enable log target upm MyUPMProfile
config log target upm MyUPMProfile filter MyLogFilter severity Info

Reply