In addition to fan and power supply status, the other thing I wish I could look for with SNMP instead of a brutally ugly telnet-to-everything script is when we lose a switch in a stack.

cliConfig -l $LIST -telnetUser $USER -telnetPwd $PASSWD -c $CMDFILE | grep -e Unassigned -e ^172 | grep -B 1 Unassigned

$CMDFILE contains

show switch
exit

I flipped a coin to look for "Unassigned" or "Not Present" -- I don't think there's a difference in the results (not to date).

The other one I like to know about is whenever there are errors on the stack connection because that stacking cable SHOULDN'T have errors.

cliConfig -l $LIST -telnetUser $USER -telnetPwd $PASSWD -c $CMDFILE | grep -e "Up" -e "Down" -e host | awk -F" " '{ if ($1~"host") print $2; else {if ($2=="Up" || $2=="Down") {if ($4+$5+$7+$8>0) print $0} else {if ($3+$4+$6+$7>0) print $0}} }' | grep -B 1 -e "Up" -e "Down"

And this $CMDFILE contains

show ip address
show switch stack-ports
exit

The first command is so I have an IP address I can find with grep; the second command shows stack errors.

Those are my SecureStack telnet scripts (so far).

- Joni

Joni Keller wrote:
Hi Fritz!

I wrote a shell (bash) script that uses ATG Tools (cliConfig) to log in to our C2s. Is that close enough for you?

The heart of it is:

cliConfig -l $LIST -telnetUser $USER -telnetPwd $PASSWD -c $CMDFILE | grep -e ^1 -e "Fan2" -A 2 | grep -e "Operating" -B 6 | grep ^1

(Those grep ^1 passes catch all of the IP addresses we use. You may want to modify them to catch any line starting with a number!!! I just took a quick-n-dirty shortcut for my environment.) The CMDFILE is:

show sys
exit

So the first grep pipe picks up the IP address and the line about fans ie "Fan2" and also includes 2 lines after the match. Next grep pipeline looks for "Operating" and includes 6 lines before the match. What's left is IP addresses and bad fan messages, so I pull out just the IP addresses. I recommend trying this a few times for yourself to see if I have a glaring omission. On the other hand, my script just caught two switches on this week's run so it does something.

- Joni

Fritz Buetikofer wrote:
Hi

In the past week we have experienced a few outages due to fan failures
of secure stack systems, where in one case we've seen syslog messages
alarming us on the critical event but in the other cases we have not see
any alarms. This is an old issue, which I have with Enterasys and I have
already opened an enhancement request for adding the power-supply and
fan status to the private mib in 2007. But as the realization of this ER is not
yet done, I have severe problems with secure stack systems where the fans
fail.

So my question is, who out in Enterasys land has written a perl script
to connect thru the CLI to secure stacks and read out the power supply
and fan status of the system ?


Thank you and best regards,

--Fritz.
___________________________
University of Bern
Computer Services Department

Fritz Buetikofer
Senior IT Manager

Gesellschaftsstrasse 6
CH-3012 Bern
Switzerland
Tel.    +41 (0)31 631 3843
Fax.   +41 (0)31 631 3865
Web. http://www.id.unibe.ch

---
To unsubscribe from enterasys, send email to [EMAIL PROTECTED] with the body: 
unsubscribe enterasys [EMAIL PROTECTED]

Reply via email to