Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
I'm trying to graph the CPU usage of a remote Unix server. When I try to add the "SNMP - Interface Statistics" data query, it says Success [0 Items, 0 Rows]. The verbose query says
+ Running data query [9].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/host_cpu.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /usr/local/cacti/scripts/query_host_cpu.php 192.0.0.236 public 1 index'
+ Executing script query '/usr/bin/php -q /usr/local/cacti/scripts/query_host_cpu.php 192.0.0.236 public 1 query index'
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/host_cpu.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/host_cpu.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/host_cpu.xml'
But, when I run snmpwalk -v 1 -c public 192.0.0.236 .1.3.6.1.2.1.25.3.3.1 I get
/usr/bin/php -q /usr/local/cacti/scripts/query_host_cpu.php 192.0.0.236 public 1 query index
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
PHP Warning: main(../include/config.php): failed to open stream: No such file or directory in /usr/local/cacti/scripts/query_host_cpu.php on line 3
PHP Warning: main(): Failed opening '../include/config.php' for inclusion (include_path='.:/usr/lib/php') in /usr/local/cacti/scripts/query_host_cpu.php on line 3
PHP Warning: main(../include/snmp_functions.php): failed to open stream: No such file or directory in /usr/local/cacti/scripts/query_host_cpu.php on line 4
PHP Warning: main(): Failed opening '../include/snmp_functions.php' for inclusion (include_path='.:/usr/lib/php') in /usr/local/cacti/scripts/query_host_cpu.php on line 4
Would I need to change something in the php.ini file?
I looked at it more today and noticed that snmp_functions.php wasn't in my includes directory. I looked in my cacti_old directory (my backup directory before I upgraded) and I noticed there were more files in that directory than my current one. Should I copy those over too?
I re-ran /usr/bin/php -q /usr/local/cacti/scripts/query_host_cpu.php 192.0.0.236 public 1 query index as root and it didn't give any errors, but when I tried the SNMP - Get Processor Information for my Unix server, it's still saying 0 Items, 0 Rows. What else should I be looking for?
PHP Warning: main(../include/config.php): failed to open stream: No such file or directory in /usr/local/cacti/scripts/query_host_cpu.php
Make sure that you are in the scripts directory when you run it and try again, let me know the results.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
PHP Warning: main(../include/config.php): failed to open stream: No such file or directory in /usr/local/cacti/scripts/query_host_cpu.php
Make sure that you are in the scripts directory when you run it and try again, let me know the results.
I removed the snmp_functions.php file and ran the command again as root from the scripts directory and this time just got the errors about not finding snmp_functions.php
PHP Warning: main(../include/snmp_functions.php): failed to open stream: No such file or directory in /usr/local/cacti/scripts/query_host_cpu.php on line 4
PHP Warning: main(): Failed opening '../include/snmp_functions.php' for inclusion (include_path='.:/usr/lib/php') in /usr/local/cacti/scripts/query_host_cpu.php on line 4
TheWitness wrote:Please post results of "php -v". Verify that "register_arg..." is "On" in your PHP.INI file.
Thanks,
TheWitness
I'm using PHP 4.3.4 and register_argc_argv was Off, so I changed it to On and restarted Apache and verified it was now on from phpinfo(). I tried the "SNMP - Get Processor Information" data query again on my Unix host and still no information pulls back.
Maybe, I use 5.1.2 on my dev box. But I have used 5.0.x in production enviroments.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Ok, I got PHP upgraded to 4.3.11 and still no rows pull for SNMP - Get Processor Information. I'll see if I can get net-snmp upgraded to 5.1.2 today before I leave work
Is there any other information you need to help fix my problem?