[solved]Get Mounted Partitions and Get Processor Information
Moderators: Developers, Moderators
[solved]Get Mounted Partitions and Get Processor Information
I am running Cacti Version Version 0.8.7 because 0.8.7b does not work, (Something about 'Invalid PHP_SELF Path', which I then fix with a workaround on the forums then I can't log in at all)
Everything is working except the "Associated Data Queries" Get Mounted Partitions and Get Processor Information... Which are the reason I installed Cacti!
If I run the command:
c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php localhost 3 2:161:500:public:::MD5::DES: query sau
Then the responce is:
1!4096
2!0
3!65536
4!65536
Which I would assume is the correct values, however no matter how many times I click "Reload Data Query" (the Green Circle) it constantly returns "Success [0 Items, 0 Rows] " and does not allow me to graph the disk.
Any ideas at all? I am happy to provide any further information required and happy to try anything as I am tearing my hair out here since 7:30 (when I started work) this morning trying to get this to work correctly!
Kind Regards and thankyou in advance
Sam
Everything is working except the "Associated Data Queries" Get Mounted Partitions and Get Processor Information... Which are the reason I installed Cacti!
If I run the command:
c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php localhost 3 2:161:500:public:::MD5::DES: query sau
Then the responce is:
1!4096
2!0
3!65536
4!65536
Which I would assume is the correct values, however no matter how many times I click "Reload Data Query" (the Green Circle) it constantly returns "Success [0 Items, 0 Rows] " and does not allow me to graph the disk.
Any ideas at all? I am happy to provide any further information required and happy to try anything as I am tearing my hair out here since 7:30 (when I started work) this morning trying to get this to work correctly!
Kind Regards and thankyou in advance
Sam
I finally managed to open : http://bsod2600.home.comcast.net/~bsod2 ... s.html#FAQ
And read this:
Q: Why doesn't Windows return Disk or CPU usage via SNMP?
A: Open up the SNMP Service and click on the Agent tab. Make sure all the service checkboxes are marked (they are not by default). Restart the SNMP service.
OK. Tried that and it made no difference...
Any other Ideas?
Thanks!
And read this:
Q: Why doesn't Windows return Disk or CPU usage via SNMP?
A: Open up the SNMP Service and click on the Agent tab. Make sure all the service checkboxes are marked (they are not by default). Restart the SNMP service.
OK. Tried that and it made no difference...
Any other Ideas?
Thanks!
Running the Data Querey in Verbose mode and I see the following output:
Data Query Debug Information
+ Running data query [8].
+ Found type = '6 '[script query].
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php localhost 3 2:161:500:orionitops:::MD5::DES: index'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php localhost 3 2:161:500:orionitops:::MD5::DES: query index'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php localhost 3 2:161:500:orionitops:::MD5::DES: query description'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php localhost 3 2:161:500:orionitops:::MD5::DES: query sau'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
Sorry for all the posts, just trying to give as much information as possible!
Thanks Again
Sam
Data Query Debug Information
+ Running data query [8].
+ Found type = '6 '[script query].
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php localhost 3 2:161:500:orionitops:::MD5::DES: index'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php localhost 3 2:161:500:orionitops:::MD5::DES: query index'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php localhost 3 2:161:500:orionitops:::MD5::DES: query description'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php localhost 3 2:161:500:orionitops:::MD5::DES: query sau'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'
Sorry for all the posts, just trying to give as much information as possible!
Thanks Again
Sam
1) you really should be using cacti 0.8.7b. Did you follow my installation guide on how to properly configure/install everything? Alternatively, you should try my installer.
2) you're using SNMPv3 against a Widows host? that's not going to work, change it to SNMPv2.
3) I see you also specified a different SNMP community between your manual snmpwalk and the one cacti is using -- mistake?
2) you're using SNMPv3 against a Widows host? that's not going to work, change it to SNMPv2.
3) I see you also specified a different SNMP community between your manual snmpwalk and the one cacti is using -- mistake?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
I did follow your guide, but it had the issues as said above... I can try the installer but everything is installed now?BSOD2600 wrote:1) you really should be using cacti 0.8.7b. Did you follow my installation guide on how to properly configure/install everything? Alternatively, you should try my installer.
Sorry no its SNMPv2 I've selected.BSOD2600 wrote:2) you're using SNMPv3 against a Widows host? that's not going to work, change it to SNMPv2.
no I changed it in the manual snmpwalk but forgot to change it in the cacti quote's - My fault!BSOD2600 wrote:3) I see you also specified a different SNMP community between your manual snmpwalk and the one cacti is using -- mistake?
I removed all software, stripped the box back to the barebones as it were, and then ran your installer.
Then I get the following message:
Invalid PHP_SELF Path PHP Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\wwwroot\cacti\include\global.php on line 112
So I put:
print "<pre>";
print_r($_SERVER);
print "</pre>";
into global.php and got:
Array
(
[ALLUSERSPROFILE] => C:\Documents and Settings\All Users
[CommonProgramFiles] => C:\Program Files\Common Files
[COMPUTERNAME] => DBFRZS3J
[ComSpec] => C:\WINDOWS\system32\cmd.exe
[CONTENT_LENGTH] => 0
[FP_NO_HOST_CHECK] => NO
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => */*
[HTTP_ACCEPT_LANGUAGE] => en-gb
[HTTP_CONNECTION] => Keep-Alive
[HTTP_HOST] => 127.0.0.1
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_CACHE_CONTROL] => no-cache
[HTTPS] => off
[INSTANCE_ID] => 1
[LOCAL_ADDR] => 127.0.0.1
[MIBDIRS] => c:\php\extras\mibs
[NUMBER_OF_PROCESSORS] => 2
[OS] => Windows_NT
[Path] => C:\Perl\site\bin;C:\Perl\bin;C:\php\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\usr\bin
[PATH_TRANSLATED] => C:\Inetpub\wwwroot\cacti\index.php
[PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
[PHPRC] => C:\php\
[PROCESSOR_ARCHITECTURE] => x86
[PROCESSOR_IDENTIFIER] => x86 Family 6 Model 15 Stepping 13, GenuineIntel
[PROCESSOR_LEVEL] => 6
[PROCESSOR_REVISION] => 0f0d
[ProgramFiles] => C:\Program Files
[REMOTE_ADDR] => 127.0.0.1
[REMOTE_HOST] => 127.0.0.1
[REQUEST_METHOD] => GET
[RoxioCentral] => C:\Program Files\Common Files\Roxio Shared\9.0\Roxio Central33\
[SCRIPT_NAME] => /cacti/index.php
[SERVER_NAME] => 127.0.0.1
[SERVER_PORT] => 80
[SERVER_PORT_SECURE] => 0
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SOFTWARE] => Microsoft-IIS/5.1
[SystemDrive] => C:
[SystemRoot] => C:\WINDOWS
[TEMP] => C:\WINDOWS\TEMP
[TMP] => C:\WINDOWS\TEMP
[USERPROFILE] => C:\Documents and Settings\LocalService
[windir] => C:\WINDOWS
[ORIG_PATH_INFO] => /cacti/index.php
[SCRIPT_FILENAME] => C:\Inetpub\wwwroot\cacti\index.php
[PHP_SELF] => /cacti/index.php
[REQUEST_TIME] => 1225814417
)
Invalid PHP_SELF Path PHP Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\wwwroot\cacti\include\global.php on line 117
Then I get the following message:
Invalid PHP_SELF Path PHP Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\wwwroot\cacti\include\global.php on line 112
So I put:
print "<pre>";
print_r($_SERVER);
print "</pre>";
into global.php and got:
Array
(
[ALLUSERSPROFILE] => C:\Documents and Settings\All Users
[CommonProgramFiles] => C:\Program Files\Common Files
[COMPUTERNAME] => DBFRZS3J
[ComSpec] => C:\WINDOWS\system32\cmd.exe
[CONTENT_LENGTH] => 0
[FP_NO_HOST_CHECK] => NO
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => */*
[HTTP_ACCEPT_LANGUAGE] => en-gb
[HTTP_CONNECTION] => Keep-Alive
[HTTP_HOST] => 127.0.0.1
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_CACHE_CONTROL] => no-cache
[HTTPS] => off
[INSTANCE_ID] => 1
[LOCAL_ADDR] => 127.0.0.1
[MIBDIRS] => c:\php\extras\mibs
[NUMBER_OF_PROCESSORS] => 2
[OS] => Windows_NT
[Path] => C:\Perl\site\bin;C:\Perl\bin;C:\php\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\usr\bin
[PATH_TRANSLATED] => C:\Inetpub\wwwroot\cacti\index.php
[PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
[PHPRC] => C:\php\
[PROCESSOR_ARCHITECTURE] => x86
[PROCESSOR_IDENTIFIER] => x86 Family 6 Model 15 Stepping 13, GenuineIntel
[PROCESSOR_LEVEL] => 6
[PROCESSOR_REVISION] => 0f0d
[ProgramFiles] => C:\Program Files
[REMOTE_ADDR] => 127.0.0.1
[REMOTE_HOST] => 127.0.0.1
[REQUEST_METHOD] => GET
[RoxioCentral] => C:\Program Files\Common Files\Roxio Shared\9.0\Roxio Central33\
[SCRIPT_NAME] => /cacti/index.php
[SERVER_NAME] => 127.0.0.1
[SERVER_PORT] => 80
[SERVER_PORT_SECURE] => 0
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SOFTWARE] => Microsoft-IIS/5.1
[SystemDrive] => C:
[SystemRoot] => C:\WINDOWS
[TEMP] => C:\WINDOWS\TEMP
[TMP] => C:\WINDOWS\TEMP
[USERPROFILE] => C:\Documents and Settings\LocalService
[windir] => C:\WINDOWS
[ORIG_PATH_INFO] => /cacti/index.php
[SCRIPT_FILENAME] => C:\Inetpub\wwwroot\cacti\index.php
[PHP_SELF] => /cacti/index.php
[REQUEST_TIME] => 1225814417
)
Invalid PHP_SELF Path PHP Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\wwwroot\cacti\include\global.php on line 117
I then performed the "Megaman" fix, and can now see the login prompt.
However, when I put valid details in and now I seem to be stuck in a never ending login loop...
These issues DO NOT happen in 0.8.7... Only in 0.8.7b
Any thoughts?
I'm happy to use 0.8.7b but it doesn't work... and then the 0.8.7 doesn't seem to work for the ss scripts...
However, when I put valid details in and now I seem to be stuck in a never ending login loop...
These issues DO NOT happen in 0.8.7... Only in 0.8.7b
Any thoughts?
I'm happy to use 0.8.7b but it doesn't work... and then the 0.8.7 doesn't seem to work for the ss scripts...
1) it's just you dude with the issues -- if there was inherit problems which you describe with cacti, the forum would be flooded with posts.
2) search your system for php.ini and remove all copies except for c:\php\php.ini.
3) Logon loops are a sign of a cookie/session issue for... php. once again, sign of it misconfigured, which leads me to believe it's not using the config my installer put in place. double-check the \php\sessiondata and \php\uploadtemp folders have the IUSR_ with modify NTFS permissions.
2) search your system for php.ini and remove all copies except for c:\php\php.ini.
3) Logon loops are a sign of a cookie/session issue for... php. once again, sign of it misconfigured, which leads me to believe it's not using the config my installer put in place. double-check the \php\sessiondata and \php\uploadtemp folders have the IUSR_ with modify NTFS permissions.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
BSOD, I really do appreciate your help Thankyou!
So far I'm stumped... why would the same setup (PHP etc) work for 0.8.7 and not 0.8.7b... I assume that b is a minor bug fix, in which case there should be not that much different?
It's probably something I'm not seeing... but any pointers are very much appreciated!
So far I'm stumped... why would the same setup (PHP etc) work for 0.8.7 and not 0.8.7b... I assume that b is a minor bug fix, in which case there should be not that much different?
It's probably something I'm not seeing... but any pointers are very much appreciated!
You're saying that you can switch JUST the website files with cacti 0.8.7a where it works, then drop in 0.8.7b files and it does not? Then yes, sounds like some sort of bug... which probably has already been fixed in upcoming 0.8.7c.SamD wrote:So far I'm stumped... why would the same setup (PHP etc) work for 0.8.7 and not 0.8.7b... I assume that b is a minor bug fix, in which case there should be not that much different?
I ran the phpinfo and print_r($_SERVER); on my cacti test server and I DO have a defined DOCUMENT_ROOT. Wonder why you don't...
1) You using PHP ISAPI or CGI? Looks like CGI... any reason for it?
2) doc_root in php.ini undefined for you?
3) cgi.force_redirect = 0 set?
4) what php.ini file did you start your config with -- php.ini-dist, right?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
An update!
I again stripped the system right back to basics and then re ran the installer with the same configuration... Still no joy. So I stripped it back one further time and then installed with the installer again, but this time chose Apache. I can log in with no problems to 0.8.7b!!
Also, the "Associated Data Queries": Get Mounted Partitions and Get Processor Information are now working as well!
So the problem does not appear to be PHP, in this case it appears IIS is carp...
However there is one slight issue now... and that is that the partitions graphs and Proc info graphs are showing 0 values... even though they seem to be being detected...
At least we're getting there now!
I again stripped the system right back to basics and then re ran the installer with the same configuration... Still no joy. So I stripped it back one further time and then installed with the installer again, but this time chose Apache. I can log in with no problems to 0.8.7b!!
Also, the "Associated Data Queries": Get Mounted Partitions and Get Processor Information are now working as well!
So the problem does not appear to be PHP, in this case it appears IIS is carp...
However there is one slight issue now... and that is that the partitions graphs and Proc info graphs are showing 0 values... even though they seem to be being detected...
At least we're getting there now!
Further Update...
It appears that only the localhost (windows xp) cannot get any values for Processor and Harddrive, remote servers can.
So looks like everything is ok now (I can live with localhost not statting)
A further question though... and It might need its own thread, if so then I'll start another...
Is it possible to "overlay" graphs on top of each other? For example one of our servers has 8 CPU's and I would prefer to have one graph with all the proc's showing on the single graph (8 lines on one graph)... does that make sence? Is it possible?
Thanks again!
Sam
It appears that only the localhost (windows xp) cannot get any values for Processor and Harddrive, remote servers can.
So looks like everything is ok now (I can live with localhost not statting)
A further question though... and It might need its own thread, if so then I'll start another...
Is it possible to "overlay" graphs on top of each other? For example one of our servers has 8 CPU's and I would prefer to have one graph with all the proc's showing on the single graph (8 lines on one graph)... does that make sence? Is it possible?
Thanks again!
Sam
Who is online
Users browsing this forum: No registered users and 1 guest