Script Server doesn't return values

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

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

Script Server doesn't return values

#1 Post by Instigater » Thu Jul 26, 2012 8:35 am

I' making a new template for Cisco IOS XR CPU usage and encountered a problem I don't see a solution. What could be the problem?

When I execute script from command line, values are returned. Executing it via verbose query from web interface returns 0 indexes.

Code: Select all

+ Running data query [43].
+ Found type = '6' [Script Query - Script Server].
+ Found data query XML file at '/srv/www/htdocs/resource/script_server/cisco_cpmcpu.xml'
+ XML file parsed ok.
+ <arg_num_indexes> missing in XML file, 'Index Count Changed' not supported
+ Executing script for list of indexes '"/usr/bin/php" -q /srv/www/htdocs/scripts/ss_cisco_cpmcpu.php xxx.xxx.xxx.xxx 784 2:161:1500:1:10:[email protected]!3v$C3Y:::::: index' Index Count: 0
+ Executing script query '"/usr/bin/php" -q /srv/www/htdocs/scripts/ss_cisco_cpmcpu.php xxx.xxx.xxx.xxx 784 2:161:1500:1:10:[email protected]!3v$C3Y:::::: query index'
+ Executing script query '"/usr/bin/php" -q /srv/www/htdocs/scripts/ss_cisco_cpmcpu.php xxx.xxx.xxx.xxx 784 2:161:1500:1:10:[email protected]!3v$C3Y:::::: query 1min'
+ Executing script query '"/usr/bin/php" -q /srv/www/htdocs/scripts/ss_cisco_cpmcpu.php xxx.xxx.xxx.xxx 784 2:161:1500:1:10:[email protected]!3v$C3Y:::::: query 5min'
CMD (I had to put an apostrophes around community or else bash is interpreting it wrong)

Code: Select all

l-vm-150:/srv/www/htdocs/resource/script_server # "/usr/bin/php" -q /srv/www/htdocs/scripts/ss_cisco_cpmcpu.php xxx.xxx.xxx.xxx 784 2:161:1500:1:10:'[email protected]!3v$C3Y':::::: index
66
82
2050
2066
2082

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Script Server doesn't return values

#2 Post by BSOD2600 » Thu Jul 26, 2012 11:41 am

Instigater wrote:When I execute script from command line, values are returned. Executing it via verbose query from web interface returns 0 indexes.
Typically a sign that permissions of the web service are lacking to execute that script/dependencies.

User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

Re: Script Server doesn't return values

#3 Post by Instigater » Fri Jul 27, 2012 2:57 am

Checked permission, should be OK.

Tested from web interface, got anticipated response:

Code: Select all

This script is only meant to run at the command line.
So, webserver can access the script. How can I debug SS's .xml > .php link?

Post Reply