how to troubleshoot partial Result:U when script works ok

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
enriquet
Posts: 30
Joined: Wed May 09, 2012 11:03 am

how to troubleshoot partial Result:U when script works ok

Post by enriquet »

Hi, for some day i ve been stuck in troubleshooting the following.
I have 4 devices with ios xr. Using template in forums i ve been able to import query to graph optic power on some interfaces. I succeded in two of them, but the same templates, query and script that works with them does not work with the other 2.

Strange thing is that the log seems to have some kind of problem executing script:
04/28/2020 12:13:18 PM - CMDPHP: Poller[0] Host[968] DS[35419] WARNING: Result from SERVER not valid. Partial Result: U
04/28/2020 12:13:18 PM - CMDPHP: Poller[0] Host[968] DS[35419] SERVER: /usr/share/cacti/site/scripts/ss_cisco_sfp_dom.php ss_sfp dcb
2poc1.in.antel.net.uy n0ucpchu3 2 get rx 49087342.65863335, output: U

but executing it works ok as below:


$ php /usr/share/cacti/site/script_server.php
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/http.so' - /usr/lib/php5/20100525/http.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Script Server has Started - Parent is cmd
/usr/share/cacti/site/scripts/ss_cisco_sfp_dom.php ss_sfp dcb2poc1.in.antel.net.uy n0ucpchu3 2 get tx 49087342.65863335
-1.4448

Any ideas as how to work to troubleshoot would be very appreciated.
Thanks

Enrique
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: how to troubleshoot partial Result:U when script works ok

Post by TheWitness »

Fix that warning first, and then test with cmd.php. If you are using spine, you have to be careful with timeouts.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
enriquet
Posts: 30
Joined: Wed May 09, 2012 11:03 am

Re: how to troubleshoot partial Result:U when script works ok

Post by enriquet »

ok. thanks for your help.
Warning its fixed.
I ran the command php cmd.php with the id of the host and the id of the datasource. Expected to see output in screen but its not there. If its in the log i will lose it with a lot of other information. Tried to find out how to do this reading docs to avoid bothering you with this question, i understand its kind of basic, but i couldnt. Sorry
enriquet
Posts: 30
Joined: Wed May 09, 2012 11:03 am

Re: how to troubleshoot partial Result:U when script works ok

Post by enriquet »

Searched the log and seems to be some difference with results of manual command and cron command:


05/11/2020 04:04:42 PM - CMDPHP: Poller[0] Host[968] DS[35419] SERVER: /usr/share/cacti/site/scripts/ss_cisco_sfp_dom.php ss_sfp dcb2poc1.in.antel.net.uy n0ucpchu3 2 get rx 49087342.65863335, output: -3.5655
(this one could corresponden to manual execution)


05/11/2020 04:13:21 PM - CMDPHP: Poller[0] Host[968] DS[35419] WARNING: Result from SERVER not valid. Partial Result: U
05/11/2020 04:13:21 PM - CMDPHP: Poller[0] Host[968] DS[35419] SERVER: /usr/share/cacti/site/scripts/ss_cisco_sfp_dom.php ss_sfp dcb2poc1.in.antel.net.uy n0ucpchu3 2 get rx 49087342.65863335, output: U
User avatar
camerabob
Cacti User
Posts: 386
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: how to troubleshoot partial Result:U when script works ok

Post by camerabob »

One thing that came to my mind: Check permissions on the script. Make sure that cmd.exe can execute it.
Last edited by camerabob on Thu Jun 25, 2020 9:00 am, edited 1 time in total.
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
enriquet
Posts: 30
Joined: Wed May 09, 2012 11:03 am

Re: how to troubleshoot partial Result:U when script works ok

Post by enriquet »

I ve already checked that, and also included full paths to everything, I also executed poll manually only for this host and everything seems to be executed, as also log shows. The only problem is that is returns result not valid. I am stuck in that since i ve opened the case. Not many hopes in that being resolved at this moment
eriks
Posts: 30
Joined: Wed Aug 25, 2010 4:57 pm

Re: how to troubleshoot partial Result:U when script works ok

Post by eriks »

Make sure your data source has a lower limit of "U" since you are returning a negative value, you need to ensure that you can accept a value less then 0 - the default is often zero.
enriquet
Posts: 30
Joined: Wed May 09, 2012 11:03 am

Re: how to troubleshoot partial Result:U when script works ok

Post by enriquet »

Yes. I have set U both for minimum and maximum value
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests