Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Jun 18, 2019 12:02 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 127 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 9  Next
Author Message
 Post subject:
PostPosted: Tue Feb 27, 2007 1:55 pm 
Offline

Joined: Tue Feb 27, 2007 1:41 pm
Posts: 1
In fact, according to lib/snmp.php, it seems that cacti first tries to use the snmp module of php instead of snmp binaries provided by ucd snmp or net snmp.

So a solution is to prevent php to load the snmp extension module.
Code:
On Fedora Core6, update /etc/php.d/snmp.ini:
replace
   extension=snmp.so
by
   ;extension=snmp.so


At least for net snmp there is one specific option which removes the symbolic labels from enumeration values (see man snmpcmd). I have cheched the lib/snmp.php script and snmpwalk is executed with this needed option.

Now graphes are created with correct values.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 6:51 pm 
Offline

Joined: Mon Mar 05, 2007 6:24 pm
Posts: 6
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)\(|\)$");


Last edited by yeled on Mon Mar 05, 2007 6:57 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 6:52 pm 
Offline

Joined: Mon Mar 05, 2007 6:24 pm
Posts: 6
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

Quote:
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$");


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 6:53 pm 
Offline

Joined: Mon Mar 05, 2007 6:24 pm
Posts: 6
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)\(|\)$");


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 07, 2007 10:56 pm 
Offline

Joined: Wed Dec 06, 2006 12:02 am
Posts: 45
Location: Perth , Australia
This worked for me,

Thanks Yeled.


Top
 Profile  
 
 Post subject: I dont see " Interface-status" template in Graph t
PostPosted: Thu Mar 08, 2007 8:26 am 
Offline

Joined: Mon Feb 05, 2007 8:03 am
Posts: 38
Hi,

I configured as mentioned above after importing the templates.but I don't find "Interface status" template in Graph template drop down box. Instead i see only "interface-traffic" for the respective interface.

This is what debug says. FInd the attached screen shot.

Please suggest me further.

RRDTool Command:

/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Ganesha_Router - Interface Status" \
--rigid \
--base=1000 \
--height=50 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="status" \
--slope-mode \
AREA:#FFC73B:"Current status\:" \
GPRINT::LAST:"%8.2lf%s\n" \
COMMENT:"(1 = Up | 2 = Down)\n"

RRDTool Says:

ERROR: parameter '#FFC73B' does not represent a number in line AREA:#FFC73B:Current status\:
:cry:


Attachments:
File comment: Unable to take dropdown open Printscreen shot,but it doesn't shows interface-status template here.
Screenshot.jpg
Screenshot.jpg [ 77.91 KiB | Viewed 12469 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 15, 2007 2:49 am 
Offline
Cacti User

Joined: Fri Jan 26, 2007 2:28 am
Posts: 57
Hi flipflap,

I am using your template to monitor my APs and it's veru useful...

I found out yesterday that the OID your are using could also be used to monitor the status of any interface (for example the status of an ethernet port on a switch...)... could you be kind enough to modify your template in order to do this ?

Thanks a lot !!!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 19, 2007 11:56 am 
Offline

Joined: Fri Mar 16, 2007 12:00 pm
Posts: 1
OK I am wondering is it possible to integrate this with my traffic flow graph. I would like to have it so that the graph is shaded when the interface is up and graphs the input and output flow rate and then leaves a blank spot on the graph to show when the interface is down.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 19, 2007 2:45 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5318
Location: United Kingdom
I've been trying to get this working for a weathermap today. I have modified the interface.xml so that opStatus is an output, added the VALUE/REGEXP suggested here, modified lib/snmp.php as suggested by yeled, disabled the php-snmp module, and still I get a 'U' rather than a real result. snmpwalk shows the normal "up(1)" result.

I have a graph template and data template that seem to work OK, and new data sources are created, and polled, as expected. I just don't get useful data out of interface.xml... is there anything else to check? The DEBUG mode log lines just say:
Code:
03/19/2007 03:20:08 PM - CACTID: Poller[0] Host[156] DS[2693] WARNING: Result from SNMP not valid. Partial Result: ...
03/19/2007 03:20:08 PM - CACTID: Poller[0] Host[156] DS[2693] SNMP: v2: 10.225.6.12, dsname: op_status, oid: .1.3.6.1.2.1.2.2.1.8.10101, value: U
03/19/2007 03:20:08 PM - CACTID: Poller[0] Host[156] DS[2694] WARNING: Result from SNMP not valid. Partial Result: ...
03/19/2007 03:20:08 PM - CACTID: Poller[0] Host[156] DS[2694] SNMP: v2: 10.225.6.12, dsname: op_status, oid: .1.3.6.1.2.1.2.2.1.8.10115, value: U


It's a Cisco 3650G, in case it's relevant, and:
Quote:
Cacti Version - 0.8.6j
Plugin Architecture - 1.1
Poller Type - Cactid v0.8.6i
Server Info - FreeBSD 6.2-RELEASE
Web Server - Apache/2.0.59 (FreeBSD) PHP/5.2.1 with Suhosin-Patch
PHP - 5.2.1
PHP Extensions - session, Reflection, date, libxml, apache2handler, pdf, zlib, bz2, mcrypt, mbstring, xml, pcre, standard, openssl, mysql, gd, ctype
MySQL - 5.0.33-log
RRDTool - 1.2.19
SNMP - 5.3.1
Plugins
    PHP Network Weathermap (weathermap - v0.9pre1)
    Update Checker (update - v0.3)
    Poller Performance Report (pollperf - v0.2)
    Host Info (hostinfo - v0.1)

_________________
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 20, 2007 12:44 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
Translating up(1) to 1 would require the snmpcmd option -e. But cacti does not set this option, AFAIK. You may try to change the code. Next approach would be to use a Script Data Query; but for only translating a single item, this semms a big overkill to me.
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 24, 2007 7:57 am 
Offline

Joined: Fri Jan 12, 2007 11:44 am
Posts: 4
are you using CMD ou cactid for polling, when I changed the poller to use CMD, it works fine. I think that it's a problem with cactid (I use cactid 0.8.6g)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 24, 2007 9:36 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5318
Location: United Kingdom
schouaib wrote:
are you using CMD ou cactid for polling, when I changed the poller to use CMD, it works fine. I think that it's a problem with cactid (I use cactid 0.8.6g)


I use cactid 0.8.6h (I think), but cmd.php isn't really an option for me...

_________________
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 06, 2007 12:37 pm 
Offline
Cacti User
User avatar

Joined: Tue Jan 02, 2007 8:22 am
Posts: 52
Location: MI
Has any one been successful using this with cactid as opposed to with cmd.php?

Like some of the folks previous, I have made the changes indicated in the post but still get a result of 'U' instead of '1' when using cactid, which the system doesn't seem to be able to interpret. It does however work using the cmd.php poller.

I'm currently running Cacti 0.8.6i. I monitor mostly interface traffic on only 8 hosts, however one host, a Cisco 7613, has quite a few interfaces, so I end up with about 1700 DataSources and 861 RDDs. Poller time is usually between 70 & 100. I personally don't have a poller preference, but I was under the understanding that cactid is more efficient.

That said, Is there anyone successfully using this template with cactid? If not, is there any reason for me not to move to using cmd.php instead of cactid simply to address the issues I'm having with this template?

Thanks,

M


Top
 Profile  
 
 Post subject: the third template doesnt work
PostPosted: Thu Jun 28, 2007 8:48 am 
Offline

Joined: Thu Jun 21, 2007 9:30 am
Posts: 27
Hi.
I tried to import the tree templates. The two fisrt ones was OK, but the third one doesnt work out... when i tried to import this error appears:
Error: XML parse error.

Is this third template important to the correct function of this feature? Or it just update the interface.xml with the string "output" in the ifOperStatus tag ??


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 17, 2007 3:17 pm 
Offline

Joined: Wed Aug 15, 2007 4:13 pm
Posts: 26
hello,

cacti_data_query_snmp_interface_statistics.xml must be in snmp_queries directory ?

thx


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 127 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 9  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google Adsense [Bot], jayarathna and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group