Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


URGENT: Host Disk Fails After Upgrade to 0.8.7
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Help: General
Author Message
petpet



Joined: 09 Nov 2006
Posts: 13

PostPosted: Fri Oct 26, 2007 5:03 am    Post subject: URGENT: Host Disk Fails After Upgrade to 0.8.7 Reply with quote

Hi , installed newest version of cacti ( 0.8.7 )
When I've created graphs for disk spaces on all my windows machines grpahs are created but all return value 0
here is short verbose query

Executing script query '/usr/bin/php -q /srv/www/htdocs/cacti2/scripts/ss_host_disk.php 10.62.113.11 113 1:161:2000:public:::MD5::DES: query description'
+ Found item [hrStorageDescr='C: Label: Serial Number fcb64fa4'] index: 1
+ Found item [hrStorageDescr='D:'] index: 2
+ Found item [hrStorageDescr='E:'] index: 3
+ Found item [hrStorageDescr='Virtual Memory'] index: 4
+ Found item [hrStorageDescr='Physical Memory'] index: 5
+ Executing script query '/usr/bin/php -q /srv/www/htdocs/cacti2/scripts/ss_host_disk.php 10.62.113.11 113 1:161:2000:public:::MD5::DES: query sau'
+ Found item [hrStorageAllocationUnits='512 Bytes'] index: 1
+ Found item [hrStorageAllocationUnits='0 Bytes'] index: 2
+ Found item [hrStorageAllocationUnits='0 Bytes'] index: 3
+ Found item [hrStorageAllocationUnits='65536 Bytes'] index: 4
+ Found item [hrStorageAllocationUnits='65536 Bytes'] index: 5
+ Found data query XML file at '/srv/www/htdocs/cacti2/resource/script_server/host_disk.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti2/resource/script_server/host_disk.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti2/resource/script_server/host_disk.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti2/resource/script_server/host_disk.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti2/resource/script_server/host_disk.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti2/resource/script_server/host_disk.xml'

When I run this command manually:

/usr/bin/php -q /srv/www/htdocs/cacti2/scripts/ss_host_disk.php 10.62.113.11 113 1:161:2000:public:::MD5::DES: query sau
PHP Notice: Undefined variable: snmp_context in /srv/www/htdocs/cacti2/scripts/ss_host_disk.php on line 64
PHP Notice: Undefined variable: snmp_context in /srv/www/htdocs/cacti2/scripts/ss_host_disk.php on line 65
1!512 Bytes
2!0 Bytes
3!0 Bytes
4!65536 Bytes
5!65536 Bytes

I increased snmp timeout limit to 2000

Here is a part of the log:

....
10/26/2007 11:55:06 AM - CMDPHP: Poller[0] Host[113] DS[1471] SERVER: /srv/www/htdocs/cacti2/scripts/ss_host_disk.php ss_host_disk 10.62.113.11 113 1:161:2
000:public:::MD5::DES: get used 5, output: 0
10/26/2007 11:55:06 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (1471, 'hdd_used', '2
007-10-26 11:55:05', '0')"
10/26/2007 11:55:06 AM - PHPSVR: Poller[0] DEBUG: INC: '/srv/www/htdocs/cacti2/scripts/ss_host_disk.php' FUNC: 'ss_host_disk' PARMS: '10.62.113.11 113 1:16
1:2000:public:::MD5::DES: get total 5'
.....

However, ss_host_cpu.php works well on all machines

I've read that I'm not alone with this problem but I didn't find any solution for this.
thanks for your answer
pet
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9723
Location: MI, USA

PostPosted: Fri Oct 26, 2007 5:39 am    Post subject: Reply with quote

The attached will fix that problem. Thanks for catching this.

TheWitness



ss_host_disk.zip
 Description:
Revised file.

Download
 Filename:  ss_host_disk.zip
 Filesize:  1.21 KB
 Downloaded:  333 Time(s)



Last edited by TheWitness on Tue Oct 30, 2007 5:16 pm; edited 1 time in total
Back to top
petpet



Joined: 09 Nov 2006
Posts: 13

PostPosted: Fri Oct 26, 2007 7:08 am    Post subject: Reply with quote

Thnaks for reply

unfortunatelly it didn;t help.It stopped wrong message ( PHP Notice: Undefined variable: snmp_context in /srv/www/htdocs/cacti2/scripts/ss_host_disk.php on line 64 ) but it always returns values 0.
here is also snmpwalk :

monit:/srv/www/htdocs/cacti/log # snmpwalk -Os -c public -v 1 10.62.113.11 .1.3.6.1.2.1.25.2.3.1
hrStorageIndex.1 = INTEGER: 1
hrStorageIndex.2 = INTEGER: 2
hrStorageIndex.3 = INTEGER: 3
hrStorageIndex.4 = INTEGER: 4
hrStorageIndex.5 = INTEGER: 5
hrStorageType.1 = OID: hrStorageFixedDisk
hrStorageType.2 = OID: hrStorageRemovableDisk
hrStorageType.3 = OID: hrStorageCompactDisc
hrStorageType.4 = OID: hrStorageVirtualMemory
hrStorageType.5 = OID: hrStorageRam
hrStorageDescr.1 = STRING: C:\ Label: Serial Number fcb64fa4
hrStorageDescr.2 = STRING: D:\
hrStorageDescr.3 = STRING: E:\
hrStorageDescr.4 = STRING: Virtual Memory
hrStorageDescr.5 = STRING: Physical Memory
hrStorageAllocationUnits.1 = INTEGER: 512 Bytes
hrStorageAllocationUnits.2 = INTEGER: 0 Bytes
hrStorageAllocationUnits.3 = INTEGER: 0 Bytes
hrStorageAllocationUnits.4 = INTEGER: 65536 Bytes
hrStorageAllocationUnits.5 = INTEGER: 65536 Bytes
hrStorageSize.1 = INTEGER: 142496549
hrStorageSize.2 = INTEGER: 0
hrStorageSize.3 = INTEGER: 0
hrStorageSize.4 = INTEGER: 95578
hrStorageSize.5 = INTEGER: 65519
hrStorageUsed.1 = INTEGER: 39693464
hrStorageUsed.2 = INTEGER: 0
hrStorageUsed.3 = INTEGER: 0
hrStorageUsed.4 = INTEGER: 13421
hrStorageUsed.5 = INTEGER: 16595
hrStorageAllocationFailures.1 = Counter32: 0
hrStorageAllocationFailures.2 = Counter32: 0
hrStorageAllocationFailures.3 = Counter32: 0
hrStorageAllocationFailures.4 = Counter32: 0
hrStorageAllocationFailures.5 = Counter32: 0


The problem is that it works under previous 0.8.6j version
Here is output from the same host:
10/26/2007 02:06:19 PM - CMDPHP: Poller[0] Host[2] DS[13] SERVER: /srv/www/htdocs/cacti3/scripts/ss_host_disk.php ss_host_disk 10.62.113.11 2 1:16
1:500:public:::MD5::[None] get used 5, output: 1076101120

Thanks
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9723
Location: MI, USA

PostPosted: Fri Oct 26, 2007 7:16 am    Post subject: Reply with quote

Show me the 0.8.7 debug output as show here.

TheWitness
Back to top
petpet



Joined: 09 Nov 2006
Posts: 13

PostPosted: Fri Oct 26, 2007 7:44 am    Post subject: Reply with quote

So , I'm monitoring physical memory on windows machine
here is the debug from 0.8.6j:

10/26/2007 02:39:17 PM - PHPSVR: Poller[0] DEBUG: INC: '/srv/www/htdocs/cacti3/scripts/ss_host_disk.php' FUNC: 'ss_host_disk' PARMS: '10.62.113.11 2 1:161:
500:public:::MD5::[None] get total 5'
10/26/2007 02:39:17 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select field_value from host_snmp_cache where host_id=2 and field_name='hrStorageAllocationUni
ts' and snmp_index='5'"
10/26/2007 02:39:17 PM - CMDPHP: Poller[0] Host[2] DS[14] SERVER: /srv/www/htdocs/cacti3/scripts/ss_host_disk.php ss_host_disk 10.62.113.11 2 1:161:500:pub
lic:::MD5::[None] get total 5, output: 4293853184
10/26/2007 02:39:17 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (14, 'hdd_total', '20
07-10-26 14:39:17', '4293853184')"
10/26/2007 02:39:17 PM - PHPSVR: Poller[0] DEBUG: INC: '/srv/www/htdocs/cacti3/scripts/ss_host_disk.php' FUNC: 'ss_host_disk' PARMS: '10.62.113.11 2 1:161:
500:public:::MD5::[None] get used 5'
10/26/2007 02:39:17 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select field_value from host_snmp_cache where host_id=2 and field_name='hrStorageAllocationUni
ts' and snmp_index='5'"
10/26/2007 02:39:17 PM - CMDPHP: Poller[0] Host[2] DS[14] SERVER: /srv/www/htdocs/cacti3/scripts/ss_host_disk.php ss_host_disk 10.62.113.11 2 1:161:500:pub
lic:::MD5::[None] get used 5, output: 1095892992


And here is the newest one - 0.8.6.7

10/26/2007 02:40:15 PM - PHPSVR: Poller[0] DEBUG: INC: '/srv/www/htdocs/cacti2/scripts/ss_host_disk.php' FUNC: 'ss_host_disk' PARMS: '10.62.113.11 113 1:
161:2000:public:::MD5::DES: get used 5'
10/26/2007 02:40:15 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select field_value from host_snmp_cache where host_id=113 and field_name='hrStorageAllocatio
nUnits' and snmp_index='5'"
10/26/2007 02:40:15 PM - CMDPHP: Poller[0] Host[113] DS[2280] SERVER: /srv/www/htdocs/cacti2/scripts/ss_host_disk.php ss_host_disk 10.62.113.11 113 1:161
:2000:public:::MD5::DES: get used 5, output: 0
10/26/2007 02:40:15 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (2280, 'hdd_used',
'2007-10-26 14:40:07', '0')"
10/26/2007 02:40:15 PM - PHPSVR: Poller[0] DEBUG: INC: '/srv/www/htdocs/cacti2/scripts/ss_host_disk.php' FUNC: 'ss_host_disk' PARMS: '10.62.113.11 113 1:
161:2000:public:::MD5::DES: get total 5'
10/26/2007 02:40:15 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select field_value from host_snmp_cache where host_id=113 and field_name='hrStorageAllocatio
nUnits' and snmp_index='5'"
10/26/2007 02:40:15 PM - CMDPHP: Poller[0] Host[113] DS[2280] SERVER: /srv/www/htdocs/cacti2/scripts/ss_host_disk.php ss_host_disk 10.62.113.11 113 1:161
:2000:public:::MD5::DES: get total 5, output: 0
10/26/2007 02:40:15 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (2280, 'hdd_total',
'2007-10-26 14:40:07', '0')"

Same machine at the same time

Thanks
Back to top
acrophile



Joined: 11 Sep 2003
Posts: 14
Location: Idaho

PostPosted: Fri Oct 26, 2007 10:58 am    Post subject: Reply with quote

Hi, I'm having the same problem... although I don't think I'm using the ss* scripts... I'm not even sure how those are different from the other ones...

on my setup after 0.8.7, none of my cpu & disk space graphs work for my windows boxes...

query_host_cpu.php
query_host_partitions.php

from the log:

10/25/2007 03:23:51 PM - SPINE: Poller[0] Host[25] DS[904] WARNING: Result from SNMP not valid. Partial Result: ...

when I manually execute the script I get this:

user@host:~> /usr/bin/php -q /srv/www/htdocs/cacti-0.8.7/scripts/query_host_partitions.php x.x.x.x community 2 get used 2

Warning: Missing argument 10 for cacti_snmp_get() in /srv/www/htdocs/cacti-0.8.7/lib/snmp.php on line 39
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9723
Location: MI, USA

PostPosted: Fri Oct 26, 2007 10:59 am    Post subject: Reply with quote

Argument 10 Checking.

TheWitness
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9723
Location: MI, USA

PostPosted: Fri Oct 26, 2007 11:00 am    Post subject: Reply with quote

Oh yea, that one's pretty depricated. Let me fix it now.

TheWitness
Back to top
acrophile



Joined: 11 Sep 2003
Posts: 14
Location: Idaho

PostPosted: Fri Oct 26, 2007 11:03 am    Post subject: Reply with quote

when I looked in the file, I believe I found $context as argument 10... which I believe has something to do with snmpv3 which I don't use at all...
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9723
Location: MI, USA

PostPosted: Fri Oct 26, 2007 11:03 am    Post subject: Reply with quote

Try this one.

TheWitness



query_host_partitions.zip
 Description:

Download
 Filename:  query_host_partitions.zip
 Filesize:  973 Bytes
 Downloaded:  453 Time(s)

Back to top
acrophile



Joined: 11 Sep 2003
Posts: 14
Location: Idaho

PostPosted: Fri Oct 26, 2007 11:11 am    Post subject: Reply with quote

ok, that seems to have fixed that one... now I just need an updated cpu one.

thanks!!!

btw, cacti rocks.
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9723
Location: MI, USA

PostPosted: Fri Oct 26, 2007 11:13 am    Post subject: Reply with quote

Hows that. Taking the day off to get all this roped in.

TheWitness



query_host_cpu.zip
 Description:

Download
 Filename:  query_host_cpu.zip
 Filesize:  842 Bytes
 Downloaded:  366 Time(s)

Back to top
acrophile



Joined: 11 Sep 2003
Posts: 14
Location: Idaho

PostPosted: Fri Oct 26, 2007 11:24 am    Post subject: Reply with quote

thanks, that worked as well.

Cheers!
Back to top
lordlynx



Joined: 09 Mar 2007
Posts: 7
Location: Perth, Australia

PostPosted: Sat Oct 27, 2007 2:23 am    Post subject: Reply with quote

I am in the testing a 0.8.6i to 0.8.7 upgrade under Windows. I created a test machine from a backup of the one currently running 0.8.6i, so both are running concurrently.
The upgrade itself was painless and as best I can tell so far everything is working, save for disk and memory graphs on one host. Bytes used / total are all being returned as 0.
This actual problem may be slightly different to petpet though, in that the host with broken disk graphs is the only one I poll on a port other than 161 (it's NATted behind a host which I already poll using UDP 161). Hopefully this is the key for me!

I have included dumps with roughly the same information as petpet has given above :-

From filtered Debug log (shown index 1 only although 1,2,4,5 are polled; log entries for the other IDs look the same):
10/27/2007 02:10:22 PM - PHPSVR: Poller[0] DEBUG: INC: 'c:\inetpub\wwwroot\cacti\scripts\ss_host_disk.php' FUNC: 'ss_host_disk' PARMS: '10.0.0.1 21 2:1611:3000:public:::MD5::DES: get used 1'
10/27/2007 02:10:22 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select field_value from host_snmp_cache where host_id=21 and field_name='hrStorageAllocationUnits' and snmp_index='1'"
10/27/2007 02:10:24 PM - CMDPHP: Poller[0] Host[21] DS[282] SERVER: c:\inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 10.0.0.1 21 2:1611:3000:public:::MD5::DES: get used 1, output: 0
10/27/2007 02:10:24 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (282, 'hdd_used', '2007-10-27 14:10:22', '0')"
10/27/2007 02:10:36 PM - PHPSVR: Poller[0] DEBUG: INC: 'c:\inetpub\wwwroot\cacti\scripts\ss_host_disk.php' FUNC: 'ss_host_disk' PARMS: '10.0.0.1 21 2:1611:3000:public:::MD5::DES: get total 1'
10/27/2007 02:10:36 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select field_value from host_snmp_cache where host_id=21 and field_name='hrStorageAllocationUnits' and snmp_index='1'"
10/27/2007 02:10:38 PM - CMDPHP: Poller[0] Host[21] DS[282] SERVER: c:\inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 10.0.0.1 21 2:1611:3000:public:::MD5::DES: get total 1, output: 0
10/27/2007 02:10:38 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (282, 'hdd_total', '2007-10-27 14:10:22', '0')"

Short verbose query:
+ 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 10.0.0.1 21 2:1611:3000:public:::MD5::DES: index'
..
+ Executing script query 'c:\php\php.exe -q c:\inetpub\wwwroot\cacti\scripts\ss_host_disk.php 10.0.0.1 21 2:1611:3000:public:::MD5::DES: query description'
+ Found item [hrStorageDescr='C: Label:LocalDisk Serial Number 80cfffd1'] index: 1
+ Found item [hrStorageDescr='D: Label:LocalStore - xTRA Data Serial Number fc1b70ec'] index: 2
+ Found item [hrStorageDescr='F:'] index: 3
+ Found item [hrStorageDescr='Virtual Memory'] index: 4
+ Found item [hrStorageDescr='Physical Memory'] index: 5
+ Executing script query 'c:\php\php.exe -q c:\inetpub\wwwroot\cacti\scripts\ss_host_disk.php 10.0.0.1 21 2:1611:3000:public:::MD5::DES: query sau'
+ Found item [hrStorageAllocationUnits='4096 Bytes'] index: 1
+ Found item [hrStorageAllocationUnits='4096 Bytes'] index: 2
+ Found item [hrStorageAllocationUnits='0 Bytes'] index: 3
+ Found item [hrStorageAllocationUnits='65536 Bytes'] index: 4
+ Found item [hrStorageAllocationUnits='65536 Bytes'] index: 5
+ 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'
+ 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'
+ Found data query XML file at 'c:/inetpub/wwwroot/cacti/resource/script_server/host_disk.xml'

Host details:
Windows 2003 Server Std SP2 (x86-32)
IIS6
PHP 4.4.3
MySQL 4.3.10
net-snmp 5.2.1 (PHP SNMP is also registered as installed)
Last run statistics: Time:38.7813 Method:cmd.php Processes:2 Threads:N/A Hosts:20 HostsPerProcess:10 DataSources:468 RRDsProcessed:23

I have replaced scripts/ss_host_disk.php and scripts/query_host_partitions.php with the modified ones shown above but they have had no effect on this problem.
This host also uses graphs based on the following templates:
- Host MIB - CPU Utilization
- Host MIB - Logged in Users
- Host MIB - Processes
- Host MIB - Interface - Traffic (bits/sec, Total Bandwidth)
- TCP/IP - Current TCP Connections
and they have all worked fine since the upgrade.

I'm no PHP whiz, but I've tried troubleshooting each of the scripts which seem to be directly involved with the SNMP GET request itself (and comparing them to the 0.8.6i versions) but can't find anything obvious.
Please let me know if you need further info (or want me to try anything in particular). Thanks in advance!
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9723
Location: MI, USA

PostPosted: Sat Oct 27, 2007 3:37 am    Post subject: Reply with quote

You XML file is still the old XML file. You need to update it to the 0.8.7 version.

TheWitness
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: General All times are GMT - 5 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group