Problem with PHP-Scriptserver retun

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

Moderators: Developers, Moderators

Post Reply
der_doc
Cacti User
Posts: 51
Joined: Mon Jul 24, 2006 7:20 am
Location: Braunschweig, Germany

Problem with PHP-Scriptserver retun

Post by der_doc »

Hi,
i build a Script that polls a USV an collects SNMPvalues.
That is not the problem the script work in PHP-Scriptserver.
My problem now that i will get 3 values in Cacti with one funktion (php-File).

But i found not a exaple for php.
In pearl is the Returnstring

Code: Select all

return "1min:$1 5min:$2 10min:$3";
But this String dont work in php :-?
Is there an exaple for PHP ?
The 3 Values are in the script but i get the values not in my cacti :-(
I need help.

Thanks
MfG
Der_Doc
candy
Posts: 2
Joined: Fri Mar 20, 2009 7:05 am
Contact:

Post by candy »

you can use a simple method to test:
echo "1min:$1 5min:$2 10min:$3";

if have no proble,you also can use array to return the result.

________________________
replica handbags
der_doc
Cacti User
Posts: 51
Joined: Mon Jul 24, 2006 7:20 am
Location: Braunschweig, Germany

Post by der_doc »

Hi candy,
thanks for answer. Have you got an exaple for as script with an array?
My script is so

Code: Select all

$array = array($1,$2,$3);
My Cacti shows no errors an the Scriptserver shows also no errors.
The Values are correct but wenn i looks at the graphs in cacti then the values are "n/a" :-?
I need a template for an Data Input with the php Scriptserver and the values are in an array :-?

Unfortunately all my work comes not tu an result.
So i hope erverybody can help me.
Thanks

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

Post by gandalf »

Please try 2nd link of my sig, perhaps the issue is not related to the script server
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests