Script Server Oddity

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

Moderators: Developers, Moderators

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

Script Server Oddity

Post by msw1970 »

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: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Script Server Oddity

Post by gandalf »

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

Post by msw1970 »

gandalf wrote:This is which version of cacti, please?
R.
0.8.7g
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Script Server Oddity

Post by gandalf »

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

Post by GhostOrchid »

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
Windows Host with Script Server
Windows Host with Script Server
cacti script server.PNG (54.3 KiB) Viewed 2493 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Script Server Oddity

Post by gandalf »

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

Post by GhostOrchid »

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

Post by GhostOrchid »

Another anomaly is sometime the graph will spike with unreasonable value like the graph attached
Attachments
I do not have 1.53 TB of RAM :)
I do not have 1.53 TB of RAM :)
cacti script server3.PNG (18.03 KiB) Viewed 2461 times
GhostOrchid
Posts: 23
Joined: Tue Feb 14, 2012 1:24 am

Re: Script Server Oddity

Post by GhostOrchid »

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

Post by thrasy »

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

Who is online

Users browsing this forum: No registered users and 1 guest