Cisco interface operational status monitor

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

Moderators: Moderators, Developers

Post Reply
Author
Message
angelfire007
Posts: 49
Joined: Fri Dec 15, 2006 9:14 am

#76 Post by angelfire007 » Mon Mar 09, 2009 9:05 pm

that's very good. thank you very much !!!

User avatar
JorisFRST
Cacti User
Posts: 217
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

#77 Post by JorisFRST » Thu Sep 24, 2009 5:48 am

yeled wrote:i found that with net-snmp, the trick is to replace the regexp in lib/snmp.php

Code: Select all

define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):");
with this

Code: Select all

define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$");
This did the job for me too.

why does cacti prefer php-snmp over net-snmp ?

Leddy
Cacti User
Posts: 93
Joined: Sun May 15, 2005 6:55 pm

Re: One more strange trouble

#78 Post by Leddy » Fri Jan 29, 2010 4:58 pm

I'm using Windows and followed "maxxic"'s post on Page 4 without issue. Here's the summary of what I did:
1. Import Template from Local File cacti_data_query_snmp_interface_statistics_730.xml, cacti_data_template_interface_status_190.xml, cacti_graph_template_interface_status_679.xml

2. Make changes in file interface.xml
<ifOperStatus>
<name>Status</name>
<method>walk</method>
<source>VALUE/REGEXP:[a-zA-Z]{1,}\(([1-]{1})+\)$</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.2.2.1.8</oid>
</ifOperStatus>

3. Make changes in /var/www/html/cacti/lib/snmp.php
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$");
----------------------------------------------------
Everything is working and graphing correctly. I'm using weathermap and will be graphing status with that. My question is in ragards to the graphs. Is it possible to delete these graphs but still have the data collected? On a 48 part switch it's kind of annoying to have to scroll past 48 up/down graphs to get to the bandwidth graphs (if needed).

Leddy
Cacti User
Posts: 93
Joined: Sun May 15, 2005 6:55 pm

#79 Post by Leddy » Mon Feb 01, 2010 12:45 am

Looks like deleting the graphs but leaving the data sources intact was all it took.

Wish I had thought of that sooner :)

User avatar
Howie
Cacti Guru User
Posts: 5333
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: One more strange trouble

#80 Post by Howie » Mon Feb 01, 2010 2:27 am

Leddy wrote:I'm using weathermap and will be graphing status with that. My question is in ragards to the graphs. Is it possible to delete these graphs but still have the data collected? On a 48 part switch it's kind of annoying to have to scroll past 48 up/down graphs to get to the bandwidth graphs (if needed).
Also, if you *only* want to use the status with weathermap, and don't care about graphs, you can get Weathermap to just poll the interfaces itself, and skip needing to patch Cacti... there's an SNMP datasource in Weathermap.
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

denyingthetruth
Posts: 23
Joined: Wed May 26, 2010 9:13 pm

#81 Post by denyingthetruth » Wed Jul 07, 2010 9:44 pm

I can't find the "Interface - Status" graph template on my graph template drop down box, after I imported the 3 templates.
Can somebody help me?
I'm using, spine and cacti 0.8.7e
I need this template to monitor cisco 2950 switch.
If anybody have the other 2950 template to monitor temperature,voltage,and fan, please,let me know.

I really really need this template :(

thanks.

sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

#82 Post by sukanta » Fri Jul 09, 2010 10:25 am

Same Problem for me also with same Cacti Version..Pl help....

sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

#83 Post by sukanta » Fri Jul 09, 2010 11:02 am

If Not changing following line from input to output as suggested, able to see the status in Graph creation page:

<direction>input</direction>

Pl check why we need to change it to output....

lex
Posts: 4
Joined: Wed Jul 21, 2010 4:37 pm

#84 Post by lex » Wed Jul 21, 2010 5:19 pm

sukanta wrote:Pl check why we need to change it to output....
Because if you don't, you won't be able to use the values. That's why it's called an output value ;).

sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

#85 Post by sukanta » Tue Jul 27, 2010 11:27 am

But it is working perfectly with internal...

lex
Posts: 4
Joined: Wed Jul 21, 2010 4:37 pm

#86 Post by lex » Thu Jul 29, 2010 9:08 am

sukanta wrote:But it is working perfectly with internal...
That is probably because the appropriate values were already assigned to the graph templates when they were still set to output. Re-saving the queries will probably break things when the assigned values are set to input.

If you still don't believe me ;) then open the query, click the graph template and you'll see that there are no output values available to assign to the graph template. (until you change it back to output ofcourse)

EDIT: check the attached screenshots
Attachments
snapshot1.png
input -&gt; no output values -&gt; broken
snapshot1.png (135.05 KiB) Viewed 18069 times
snapshot2.png
output -&gt; OK
snapshot2.png (139.15 KiB) Viewed 18069 times

sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

#87 Post by sukanta » Thu Aug 05, 2010 1:28 am

You are right Lex.......
But If we Change it to output the link status is not visible in Data Query [SNMP - Interface Statistics] Output which is problem.....
Any Slution on that..

Also If I make as input getting following as per screenshot but is it working.......
Attachments
Interface-Status.JPG
Interface-Status.JPG (39.2 KiB) Viewed 17983 times

User avatar
JorisFRST
Cacti User
Posts: 217
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

#88 Post by JorisFRST » Wed Sep 08, 2010 7:11 am

JorisFRST wrote:
yeled wrote:i found that with net-snmp, the trick is to replace the regexp in lib/snmp.php

Code: Select all

define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):");
with this

Code: Select all

define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$");
This did the job for me too.

why does cacti prefer php-snmp over net-snmp ?

Upgraded cacti to 0.87g and had to do this again.

yangdianqiang
Posts: 2
Joined: Thu Sep 09, 2010 5:41 am
Location: Beijing,China

It words for me

#89 Post by yangdianqiang » Thu Sep 09, 2010 5:47 am

yeled wrote:
i found that with net-snmp, the trick is to replace the regexp in lib/snmp.php

Code:
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):");


with this

Code:
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$");
This did the job for me too.

cacti 0.87e
with the following plugins:
1.plugin architecture v2.5
2.settings 0.6
3.monitor 0.9
4.thold 0.4.1

Bluejohnny
Posts: 6
Joined: Fri Dec 04, 2009 10:48 am

Graphs don't appear

#90 Post by Bluejohnny » Thu Sep 23, 2010 10:20 am

Hello,

This exactly the plugin that I need, but it seems I can't make it work. I have this error:

c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="XXX - Interface Status" \
--rigid \
--base=1000 \
--height=50 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="status" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="C\:/Apache2.2/htdocs/cacti/rra/XXX_int_status_1112.rrd":int_status:AVERAGE \
AREA:a#FFC73BFF:"Current status\:" \
GPRINT:a:LAST:"%8.2lf%s\n" \
COMMENT:"(1 = Up | 2 = Down)\n"

RRDTool Says:

ERROR: opening 'C:/Apache2.2/htdocs/cacti/rra/XXX_int_status_1112.rrd': No such file or directory

Can anyone help me?

Post Reply