CLI Script to enable SNMP link traps

Post Reply
meilon
Member
Posts: 4
Joined: 15 Feb 2013 05:43

CLI Script to enable SNMP link traps

Post by meilon »

Hi,

we'd like to send a script to all our switches to enable SNMP link up/down traps (and some other commands). Because we have single and stacked switches, 24 and 48 ports, how should I issue the "trap x/y-z port link enable" command? If I send 1/1-50 on an 24 port switch, I get "ERROR: Slot/Port out of range <1027>".

Because we didn't mix 24 and 48 port switches in stacks, I could use cli.deviceType() so see how many ports a switch has. But how do I repeat this commands for stacked switches?

Kind regards,
meilon
silvio
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 1886
Joined: 01 Jul 2008 10:51
Location: Germany

Re: CLI Script to enable SNMP link traps

Post by silvio »

you need some knowledge about javascript. For understanding there are some build-in scripts in omnivista. Maybe them will help you to understand.
regards
Silvio
meilon
Member
Posts: 4
Joined: 15 Feb 2013 05:43

Re: CLI Script to enable SNMP link traps

Post by meilon »

Hi silvio,

the coding isn't the problem (I'm pretty good with JS actually), but how to find out the number of chassis in a stack. The documentation doesn't give me any details how to find that out. Because a stack of switches with for example 3 switches consumes 3 AOS licenses I thought I could use that, but can't find a variable which gives me this number. Is there no variable/function which can give me port details? Do I have to run a "show interface status" and work with the output?

Kind regards
meilon
Post Reply

Return to “OmniVista 2500 v4.x”