Cisco interface operational status monitor

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

Moderators: Developers, Moderators

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

Post by angelfire007 »

that's very good. thank you very much !!!
User avatar
JorisFRST
Cacti User
Posts: 229
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Post by JorisFRST »

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

Post by Leddy »

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

Post by Leddy »

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: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: One more strange trouble

Post by Howie »

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.98a 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

Post by denyingthetruth »

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

Post by sukanta »

Same Problem for me also with same Cacti Version..Pl help....
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Post by sukanta »

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

Post by lex »

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

Post by sukanta »

But it is working perfectly with internal...
lex
Posts: 4
Joined: Wed Jul 21, 2010 4:37 pm

Post by lex »

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
input -&amp;gt; no output values -&amp;gt; broken
input -&gt; no output values -&gt; broken
snapshot1.png (135.05 KiB) Viewed 21567 times
output -&amp;gt; OK
output -&gt; OK
snapshot2.png (139.15 KiB) Viewed 21567 times
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Post by sukanta »

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 21481 times
User avatar
JorisFRST
Cacti User
Posts: 229
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Post by JorisFRST »

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

Post by yangdianqiang »

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

Post by Bluejohnny »

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

Who is online

Users browsing this forum: No registered users and 5 guests