Script Server Oddity

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Post Reply
Author
Message
msw1970
Cacti User
Posts: 206
Joined: Tue Jan 09, 2007 8:28 am
Location: London, UK

Script Server Oddity

#1 Post by msw1970 » Wed Feb 15, 2012 9:46 am

Hi

I'm experiencing some very strange results with a custom script running through the script server. When I test the script through the script server I get the following output...
email-tg:169 monportal-tg:0 portal-tg:2 ug-auth:82 ww-auth:0 wwemail-tg:9 wwportal-tg:0
Which is the correct result. However, I get NaN's in the graphs.

I've ran the poller with logging set to debug for one poller cycle and I get the following in the log for the same script...
02/15/2012 10:50:20 AM - CMDPHP: Poller[0] Host[191] DS[15037] SERVER: /dump/www/html/cacti/scripts/ss_bbc_myconnect_session_count.php ss_bbc_myconnect_session_count 132.185.151.137 4r0snmp 2 161 500 , output: 18
Which happens to be the same output as I get from another script server script for the same device...
02/15/2012 10:50:20 AM - CMDPHP: Poller[0] Host[191] DS[3668] SERVER: /dump/www/html/cacti/scripts/ss_cisco_cpu_usage.php ss_cisco_cpu_usage 132.185.151.137:2:4r0snmp:::::::161:500 get fiveMin 2, output: 18
I'm also seeing some other strange entries in the logs that appear to have the reverse issue...
02/15/2012 10:50:20 AM - CMDPHP: Poller[0] Host[191] DS[3667] SERVER: /dump/www/html/cacti/scripts/ss_cisco_cpu_usage.php ss_cisco_cpu_usage 132.185.151.137:2:4r0snmp:::::::161:500 get fiveMin 1, output: email-tg:198 monportal-tg:0 portal-tg:1 ug-auth:92 ww-auth:0 wwemail-tg:5 wwportal-tg:0
Anyone got any ideas, hints, clues as to why this might be happening? I've tried repairing the database and rebuilding the poller cache to no avail!!!

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Script Server Oddity

#2 Post by gandalf » Sun Feb 19, 2012 11:43 am

This is which version of cacti, please?
R.

msw1970
Cacti User
Posts: 206
Joined: Tue Jan 09, 2007 8:28 am
Location: London, UK

Re: Script Server Oddity

#3 Post by msw1970 » Sun Feb 19, 2012 11:52 am

gandalf wrote:This is which version of cacti, please?
R.
0.8.7g

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Script Server Oddity

#4 Post by gandalf » Sun Feb 19, 2012 2:57 pm

Please upgrade to 087i for better support. But I have to say that I'm not aware of an exact fix, that matches your issue. So it would only help during debugging current code instead of old one.
R.

GhostOrchid
Posts: 23
Joined: Tue Feb 14, 2012 1:24 am

Re: Script Server Oddity

#5 Post by GhostOrchid » Wed Feb 22, 2012 10:43 pm

I have the same issue with 0.8.7i both on Linux and Windows
The issue is intermittent and not isolated to one host. My attached picture is one of the host that is experiencing the issue now.

Sometime the issue go away if I reboot the Windows Host, and the issue is not isolated to fixed disk. Sometime it is C: Drive other time it could be D: Drive

Running the script server manually return correct value
PHP Script Server has Started - Parent is cmd
/var/www/html/cacti/scripts/ss_host_disk.php ss_host_disk <ip> 29 2:161:500:1:10:monitor:::::: get used 2
16483588096
/var/www/html/cacti/scripts/ss_host_disk.php ss_host_disk <ip> 29 2:161:500:1:10:monitor:::::: get total 2
36396831232
quit
PHP Script Server Shutdown request received, exiting
Attachments
cacti script server.PNG
Windows Host with Script Server
cacti script server.PNG (54.3 KiB) Viewed 1837 times

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Script Server Oddity

#6 Post by gandalf » Thu Feb 23, 2012 3:52 pm

In case this sticks to windows hosts, the most recommended first step is to increase SNMP timeout. Windows is REALLY slow on this. I recommend 1000 ms as a start.
R.

GhostOrchid
Posts: 23
Joined: Tue Feb 14, 2012 1:24 am

Re: Script Server Oddity

#7 Post by GhostOrchid » Thu Feb 23, 2012 11:15 pm

I have increase SNMP Timeout to 5000, but still the same problem

Any more idea?

GhostOrchid
Posts: 23
Joined: Tue Feb 14, 2012 1:24 am

Re: Script Server Oddity

#8 Post by GhostOrchid » Sun Feb 26, 2012 11:28 pm

Another anomaly is sometime the graph will spike with unreasonable value like the graph attached
Attachments
cacti script server3.PNG
I do not have 1.53 TB of RAM :)
cacti script server3.PNG (18.03 KiB) Viewed 1805 times

GhostOrchid
Posts: 23
Joined: Tue Feb 14, 2012 1:24 am

Re: Script Server Oddity

#9 Post by GhostOrchid » Fri Mar 02, 2012 11:37 pm

any idea how to fix this?
Another info
The Windows Server is running inside VMWARE Workstation 7

thrasy
Posts: 1
Joined: Wed Sep 12, 2012 12:14 am

Re: Script Server Oddity

#10 Post by thrasy » Thu Sep 13, 2012 4:09 am

gandalf wrote:In case this sticks to windows hosts, the most recommended first step is to increase SNMP timeout. Windows is REALLY slow on this. I recommend 1000 ms as a start.
R.
I had the same problem, this fixed it.

Thanks a bunch!

Post Reply