Monitoring switches uptime ?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
MaxStone
Posts: 5
Joined: Tue Jul 22, 2003 3:08 am

Monitoring switches uptime ?

Post by MaxStone »

Hi

I would like to monitor a lot of switches' uptime, but I can't manage to have graphs :/

I made a new data template :

Data Template:
Name : Host MIB - Uptime

Data Source:
Name : |host_description| - Uptime
Data input source : Get SNMP Data
Associated RRA's : all
Step : 300
Data Source Active : Yes

Data Source Item:
Internal data source name : uptime
Minimum value : 0
Maximum value : 1000
Data source type : gauge
Heartbeat : 600

Custom data:
OID : .1.3.6.1.2.1.1.3.0
SNMP Community : use per data source
SNMP IP adress : use per data souce
SNMP password : left blank
SNMP username : left blank
SNMP version : use per data source

I also created a graph template, with help of the documentation and the "Host MIB - Processes" template

Then I went into "polling host" and chose "create graphs + data sources" and selected "Host MIB - Uptime", checked the box and saved.

But this doesn't work :/

Here is a tail of my rrd.log :

07/22/2003 10:06 AM - CMD: /usr/bin/rrdtool update /var/www/cacti/rra/co01hu01_uptime_149.rrd --template uptime N:Timeticks: (199064505) 23 days, 0:57:25.05
07/22/2003 10:06 AM - CMD: /usr/bin/rrdtool update /var/www/cacti/rra/co03sw01_uptime_156.rrd --template uptime N:Timeticks: (2930235776) 339 days, 3:32:37.76
07/22/2003 10:06 AM - CMD: /usr/bin/rrdtool update /var/www/cacti/rra/co01sw01_uptime_155.rrd --template uptime N:Timeticks: (1882705338) 217 days, 21:44:13.38

I think it doesn't work at all because of the string that is returned, so, how could I do it ? Anyone got a script to monitor a switch uptime ? Or a tutorial ?

Configuration :

Linux debian 3.0R1, php4, mysql 3.23, cacti 0.8.2a,

Thanks a lot
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

You have to use external snmpget command in your data input script. This allows you to get only a value as a result of SNMP query:
# snmpget -c public -Ovt your.host.com .1.3.6.1.2.1.1.3.0
30321777
- bulek
MaxStone
Posts: 5
Joined: Tue Jul 22, 2003 3:08 am

Post by MaxStone »

Thx for the quick answer, but :

# snmpget -c public -Ovt myhost .1.3.6.1.2.1.1.3.0
200513183Timeticks: (200513183) 200513183

So the output isn't useable :/
MaxStone
Posts: 5
Joined: Tue Jul 22, 2003 3:08 am

Post by MaxStone »

ok, almost done :)

i wrote a small script that parses the output, and I now have correct graphs.

But when I click on the graph, it displays only the 4 graph, not the comments under it. (thats quite normal)

So I added 3 GPRINTs with Average, Min, Max in consolidation function (no Cdef, no value, print type normal) and checked them in graph items input. The small graph still displays in tree view, but when I click on it, the 4 big graphs aren't displayed (red cross : no image)

Thx again for helping a newbie in network monitoring (I'm on it since 1 week, monitoring interface traffic is very simple, but creating your own data sources and data inputs... :/)
acrophile
Posts: 19
Joined: Thu Sep 11, 2003 9:05 pm
Location: Idaho

Post by acrophile »

Hrmm, uptime seems like an odd thing to "graph"... I was wondering if there was a way to just display text output from data sources instead of graph ouputs...

For instance, on my 48 port switches, I'd rather look at a list of 48 lines of stats rather than 48 graphs (not to mention the time it takes to make all those graphs each time)... would even be nice to sort the list (or table) by certain columns, etc...

Also, it seems that you could use a CDEF instead of a script to convert the ticks into time... ?
User avatar
NetVicious
Posts: 49
Joined: Mon Oct 13, 2003 1:14 pm
Location: Spain

Post by NetVicious »

On my Linux box I have this little script for do this

[xxxx:/usr/share/cacti/scripts]# cat snmpUptime.sh
snmpget -v1 -Cf -c $1 $2 $3 | awk '{ print $5 }
.. //\/ e t . \/ i c i o u s ..
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests