Get SNMP data problem - Please Help
Moderators: Developers, Moderators
Get SNMP data problem - Please Help
I got cacti 0.6.8 installed and working on W2K, IIS5. I've been doing reading and trying to find tutorials.
I am trying to create a graph that shows Access Point registrations by using SNMP. I have a SNMPGET utility that work like this:
snmpget IP community OID
If I run it from the command line I get the number for that OID, however I'm not sure what I"m doing wrong in the Data Input Source Configuration.
Get SNMP Data is set up as "INTERNAL: <ip> <community> <oid>". Is this wrong? Does this need to be changed?
When I run the CMD.PHP I get a "No Response" error from the IP I'm trying to get the SNMP data.
Thanks in advance,
MP
I am trying to create a graph that shows Access Point registrations by using SNMP. I have a SNMPGET utility that work like this:
snmpget IP community OID
If I run it from the command line I get the number for that OID, however I'm not sure what I"m doing wrong in the Data Input Source Configuration.
Get SNMP Data is set up as "INTERNAL: <ip> <community> <oid>". Is this wrong? Does this need to be changed?
When I run the CMD.PHP I get a "No Response" error from the IP I'm trying to get the SNMP data.
Thanks in advance,
MP
-
- Posts: 3
- Joined: Mon May 12, 2003 8:06 am
- Location: Germany
- Contact:
Get SNMP Data
Hi,
you are running an own script not the one included in cacti, aren't you? So you can't write INTERNAL, because this means the script of cacti.
You must write something like "perl <path_cacti>/scripts/yourscript.pl <ip> <community> <oid>" if your script is a Perl-Script. And don't forget to define the output string.
But: why aren't you using the Get SNMP Data - Data Input from cacti. You can define a new Data Source and then add all of this above (IP, Community, OID). It would be the same!
Bey,
Jessie
you are running an own script not the one included in cacti, aren't you? So you can't write INTERNAL, because this means the script of cacti.
You must write something like "perl <path_cacti>/scripts/yourscript.pl <ip> <community> <oid>" if your script is a Perl-Script. And don't forget to define the output string.
But: why aren't you using the Get SNMP Data - Data Input from cacti. You can define a new Data Source and then add all of this above (IP, Community, OID). It would be the same!
Bey,
Jessie
Win2k - SNMP (solution) and Ping (help)
Jessie,
Thanks for the reply. I've discovered several things to tweak Cacti for Win32 as I do more and more digging. Perhaps someone can add the following tips on a Win32 FAQ or something.
1. make sure that PHP.INI has the SNMP.dll loaded otherwise the internal SNMP functions won't work
2. create c:\usr\mibs and copy all c:\php\mibs here (this way you won't get errors show up on the screen from the php script when it runs)
3. edit PHP.INI file for max_execution_time = 240 instead of 30 (this will take care of the Maximum execution time of 30 seconds exceeded error).
Obviously I've managed to get the SNMP Data working just fine as well as the SNMP Network working.
I'm still having problems with the ping script under Win2k, not sure what I need to get this to work. I'd appreciate help from anyone who has the ping running under win2k.
MP
Thanks for the reply. I've discovered several things to tweak Cacti for Win32 as I do more and more digging. Perhaps someone can add the following tips on a Win32 FAQ or something.
1. make sure that PHP.INI has the SNMP.dll loaded otherwise the internal SNMP functions won't work
2. create c:\usr\mibs and copy all c:\php\mibs here (this way you won't get errors show up on the screen from the php script when it runs)
3. edit PHP.INI file for max_execution_time = 240 instead of 30 (this will take care of the Maximum execution time of 30 seconds exceeded error).
Obviously I've managed to get the SNMP Data working just fine as well as the SNMP Network working.
I'm still having problems with the ping script under Win2k, not sure what I need to get this to work. I'd appreciate help from anyone who has the ping running under win2k.
MP
This sounds like the problem I am having!
When I try to collect snmp data, I am told that function.php errors at lines 240,241.
Modifying php.ini to use the php_snmp.dll DOES change the error message, so I seem to be in the right place. What I am now getting every 5 minutes is a popup telling me that php_snmp.dll can't be found.
I found that I LACK php_snmp.dll altogether.
Where do I get that file?
Thanks!
Also - I don't have a mibs directory in /php ??
where does that come from?
When I try to collect snmp data, I am told that function.php errors at lines 240,241.
Modifying php.ini to use the php_snmp.dll DOES change the error message, so I seem to be in the right place. What I am now getting every 5 minutes is a popup telling me that php_snmp.dll can't be found.
I found that I LACK php_snmp.dll altogether.
Where do I get that file?
Thanks!
Also - I don't have a mibs directory in /php ??
where does that come from?
Actually I find that in php/extensions I DO have php_snmp.dll.
I also found the mibs directory.
What I infer from the following is that I am still not opening an SNMP session:
###############################
snmp: 10.175.255.113, dsname: 5sec_cpu, oid: .1.3.6.1.4.1.9.9.109.1.1.1.1.3.1, value:
Warning: fopen(c://webroot//cacti//install//index.php/cacti/log/rrd.log): failed to open stream: No such file or directory in c:\webroot\cacti\include\functions.php on line 239
Warning: fwrite(): supplied argument is not a valid stream resource in c:\webroot\cacti\include\functions.php on line 240
Warning: fclose(): supplied argument is not a valid stream resource in c:\webroot\cacti\include\functions.php on line 241
################################
The fact that I fail to open a stream suggests to me that SNMP has not really connected yet.
Any debug ideas??
-mc-
I also found the mibs directory.
What I infer from the following is that I am still not opening an SNMP session:
###############################
snmp: 10.175.255.113, dsname: 5sec_cpu, oid: .1.3.6.1.4.1.9.9.109.1.1.1.1.3.1, value:
Warning: fopen(c://webroot//cacti//install//index.php/cacti/log/rrd.log): failed to open stream: No such file or directory in c:\webroot\cacti\include\functions.php on line 239
Warning: fwrite(): supplied argument is not a valid stream resource in c:\webroot\cacti\include\functions.php on line 240
Warning: fclose(): supplied argument is not a valid stream resource in c:\webroot\cacti\include\functions.php on line 241
################################
The fact that I fail to open a stream suggests to me that SNMP has not really connected yet.
Any debug ideas??
-mc-
Who is online
Users browsing this forum: No registered users and 0 guests