Monitor switch via serial/comm port?


#1

Is it possible to monitor a semi-managed switch via a remote (or local) serial/comm port? In theory, a simple heartbeat (or ping)-type command would be ideal


#2

If you can ping it you can monitor it. :slight_smile: just use the same ip…
I don’t think there are explicit check plugins for serial consoles but you could write one i think… just have it connect if it returns data send an ok back to nagios if not send an alert…

Luca
Edited Thu Jul 21 2005, 11:58PM ]


#3

If it’s a switch, it has an ip surely. If it’s a hub, then no ip. Since you say it’s a switch, I’ll assume it has an ip, so yea, just use check_ping and ping it.
But really, you should do more than that with your network and switches. You should check the status of the ports used to connect one switch to another switch with the check_snmp.
See this thread to read about what I did with switches.
meulie.net/forum_viewtopic.php?21.1402


#4

[quote=“luca”]If you can ping it you can monitor it. :slight_smile: just use the same ip…
I don’t think there are explicit check plugins for serial consoles but you could write one i think… just have it connect if it returns data send an ok back to nagios if not send an alert…

Luca
[/quote]

The switch does not have an ip or support snmp, hence it being a semi-managed switch – it’s a few years old. But it’s 1U, has 48ports with 2 gigabit GBIC backbone modules.

I’ve never written a plugin before – are there any sites/tutorials you’d recommend?


#5

[quote=“jakkedup”]If it’s a switch, it has an ip surely. If it’s a hub, then no ip. Since you say it’s a switch, I’ll assume it has an ip, so yea, just use check_ping and ping it.
But really, you should do more than that with your network and switches. You should check the status of the ports used to connect one switch to another switch with the check_snmp.
See this thread to read about what I did with switches.
meulie.net/forum_viewtopic.php?21.1402
[/quote]

The switch does not have an ip or support snmp, hence it being a semi-managed switch – it’s a few years old. But it’s 1U, has 48ports with 2 gigabit GBIC backbone modules.


#6

A switch that has no ip? Hmm, is it just not configured with one, or is it not capable of having one configured? Strange that a switch could only be managed from a com port. I have seen one, so yea, I suppose that’s what you got.
Sorry, I think you are outa luck, since you would have to have something plugged into the com port at all times, just to monitor it’s status even if you could write the plugin, so that would kinda suck.


#7

[quote=“jakkedup”]A switch that has no ip? Hmm, is it just not configured with one, or is it not capable of having one configured? Strange that a switch could only be managed from a com port. I have seen one, so yea, I suppose that’s what you got.
Sorry, I think you are outa luck, since you would have to have something plugged into the com port at all times, just to monitor it’s status even if you could write the plugin, so that would kinda suck.[/quote]

It’s not capable of grabbing an ip, which does suck, but otherwise, the switch is fine. I don’t mind having the switch console cable connected to the localhost nagios server permanently, although I’ve never written a plugin… so any help would be greatly appreciated.


#8

Neither have I, but what I have done, is cut/pasted from one script to another, modified it and somehow it worked.


#9

The easy way would be to create a shell script, you should be able to telnet (whatever) to the switch read the status file, grep-sed-awk out the info you need and pass it as an output.
With nagios you can then decide with a regex if it’s the expected output or something else (alert).

Luca