Cisco interface operational status monitor

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
mullstu
Posts: 10
Joined: Fri Jan 05, 2007 10:10 am

Post by mullstu »

RRDTool Command:

c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Cisco Router - Status - Se0/1:0" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="status" \
--slope-mode \
DEF:a="c\:/Inetpub/wwwroot/cacti/rra/cisco_router_int_status_391.rrd":int_status:AVERAGE \
AREA:a#FFC73B:"Current status\:" \
GPRINT:a:LAST:"%8.2lf%s\n" \
COMMENT:"(1 = Up | 2 = Down)\n"

RRDTool Says:

OK
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

check my post with the attached pic regarding cacti log file
mullstu
Posts: 10
Joined: Fri Jan 05, 2007 10:10 am

Post by mullstu »

Output is show a U and not a number
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

try running USR and paste the output here or better yet get a screen shot and paste it here. also can you show me a pic of the cacti poller log same one i posted. thanks

also can you double check the attached pics with the template you have imported
Attachments
data query pic
data query pic
data query pic.JPG (78.13 KiB) Viewed 16377 times
data template pic
data template pic
data template pic.JPG (101.13 KiB) Viewed 16377 times
graph template pic
graph template pic
graph template pic.JPG (95.6 KiB) Viewed 16377 times
mullstu
Posts: 10
Joined: Fri Jan 05, 2007 10:10 am

Post by mullstu »

01/08/2007 02:40:20 PM - CMDPHP: Poller[0] Host[28] DS[385] SNMP: v1: x.x.x.x, dsname: int_status, oid: .1.3.6.1.2.1.2.2.1.8.2, output: U

01/08/2007 02:40:20 PM - CMDPHP: Poller[0] Host[28] DS[385] WARNING: Result from SNMP not valid. Partial Result: up(1

01/08/2007 02:40:20 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (384, 'int_status', '2007-01-08 14:40:20', 'U')"

01/08/2007 02:40:20 PM - CMDPHP: Poller[0] Host[28] DS[384] SNMP: v1: x.x.x.x, dsname: int_status, oid: .1.3.6.1.2.1.2.2.1.8.1, output: U

01/08/2007 02:40:20 PM - CMDPHP: Poller[0] Host[28] DS[384] WARNING: Result from SNMP not valid. Partial Result: up(1
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

can you do it via command line and see what the output is. thanks
mullstu
Posts: 10
Joined: Fri Jan 05, 2007 10:10 am

Post by mullstu »

stupid question, but how do I run it from the command line?
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

sorry about usr. it's called net-snmp i called it usr because it's the folder where its installed. download it here http://net-snmp.sourceforge.net/ . then run snmpget from command line. btw what equipment are you monitoring?
lion_han
Posts: 19
Joined: Wed Oct 04, 2006 12:47 am

Post by lion_han »

I want to add this files with import templates but see: Error: XML: Hash version does not exist???
mullstu
Posts: 10
Joined: Fri Jan 05, 2007 10:10 am

Post by mullstu »

We are monitoring our Cisco routers. We have a variety of routers onsite.
Any updates on what the issue may be. I am just getting back to why thei isn't working. I got side tracked by other projects.

I downloaded the snmpget, but what command line would I run.
schouaib
Posts: 4
Joined: Fri Jan 12, 2007 11:44 am

Post by schouaib »

I also have the same problem with interface status monitoring, but I'm sure that the snmp agent respond with : up(1) or down(2) and not 1 or 2 !!!

need help please

thanks
cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Post by cwahlin »

schouaib wrote:I also have the same problem with interface status monitoring, but I'm sure that the snmp agent respond with : up(1) or down(2) and not 1 or 2 !!!

need help please

thanks
SNMP responds with 1 or 2 only. It's just your snmpget that is inteligent enough by understanding the MIB that translates it to up or down. Guess you might have to remove the MIB to get 1 or 2 only.

/Carl
hwon
Posts: 34
Joined: Thu Mar 02, 2006 4:11 pm
Location: TX

Post by hwon »

Replace <source> entry to following in your interface.xml file to extract the number from snmp output:

<ifOperStatus>
<name>Status</name>
<method>walk</method>
<source>VALUE/REGEXP:[a-zA-Z]{1,}\(([1-9]{1})+\)$</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.2.2.1.8</oid>
</ifOperStatus>
schouaib
Posts: 4
Joined: Fri Jan 12, 2007 11:44 am

Post by schouaib »

thnaks for reply, I changed interfaces.xml, but i have the same problem :
That's what I see in the poller log :
02/17/2007 12:45:01 PM - CACTID: Poller[0] Host[1] DS[2971] SNMP: v1: 127.0.0.1, dsname: int_status, oid: .1.3.6.1.2.1.2.2.1.8.3, value: U
02/17/2007 12:45:01 PM - CACTID: Poller[0] Host[1] DS[2971] WARNING: Result from SNMP not valid. Partial Result: ...

What should I do ?

tnx in advance
crackrocksteady
Posts: 45
Joined: Wed Dec 06, 2006 12:02 am
Location: Perth , Australia

Post by crackrocksteady »

I had no luck with that reg expression either.

Any clues??
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests