Cisco interface operational status monitor

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

Moderators: Moderators, Developers

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

#16 Post by mullstu » Mon Jan 08, 2007 2:17 pm

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

#17 Post by flipflap » Mon Jan 08, 2007 2:26 pm

check my post with the attached pic regarding cacti log file

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

#18 Post by mullstu » Mon Jan 08, 2007 2:37 pm

Output is show a U and not a number

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

#19 Post by flipflap » Mon Jan 08, 2007 2:40 pm

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.JPG
data query pic
data query pic.JPG (78.13 KiB) Viewed 14880 times
data template pic.JPG
data template pic
data template pic.JPG (101.13 KiB) Viewed 14880 times
graph template pic.JPG
graph template pic
graph template pic.JPG (95.6 KiB) Viewed 14880 times

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

#20 Post by mullstu » Mon Jan 08, 2007 2:46 pm

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

#21 Post by flipflap » Mon Jan 08, 2007 4:17 pm

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

#22 Post by mullstu » Mon Jan 08, 2007 4:24 pm

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

#23 Post by flipflap » Tue Jan 09, 2007 11:47 am

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

#24 Post by lion_han » Mon Jan 29, 2007 7:05 am

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

#25 Post by mullstu » Thu Feb 08, 2007 8:50 am

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

#26 Post by schouaib » Fri Feb 16, 2007 8:44 am

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

#27 Post by cwahlin » Fri Feb 16, 2007 1:40 pm

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: 31
Joined: Thu Mar 02, 2006 4:11 pm
Location: TX

#28 Post by hwon » Fri Feb 16, 2007 4:07 pm

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

#29 Post by schouaib » Sat Feb 17, 2007 6:54 am

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

#30 Post by crackrocksteady » Mon Feb 19, 2007 8:39 pm

I had no luck with that reg expression either.

Any clues??

Post Reply