PHP script + multiple result = trouble

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

Moderators: Developers, Moderators

Post Reply
User avatar
za
Posts: 44
Joined: Thu Nov 09, 2006 10:39 am

PHP script + multiple result = trouble

Post by za »

I wrote some PHP script ranning into a trouble: if the script has a multiple output cacti cannot draw the graph; but if i split the multi-output script in n sigle-output script i can built different data input, data template, data source into a unique graph template where i collect all the data source.

Actually is not a solution, 'cause i cannot use cicle and it's a real pity.

I'm in wrong?

Za
soulshepard
Posts: 9
Joined: Fri Feb 09, 2007 8:20 am

Post by soulshepard »

did u use your php script as a script server with a data query method or as a data input method?

when u run the php script does it output the result in one line with its labels?

field1:value1 field2:value2 ?

if u used a script server did you compared it with the examples allready in cacti?

Thanks
User avatar
za
Posts: 44
Joined: Thu Nov 09, 2006 10:39 am

Post by za »

I used it like a data input method; the output was in the correct format

filed1:value1 field2:value2

I tried with the ss_fping script.. but also in that case i cannot watch the graph, but the oddest thing is that I can display, in the log file, the correct result.

U can use correctly a multiple output php script?

Thanks for the quick reply!

Za
romanmir
Posts: 4
Joined: Wed May 31, 2006 6:07 pm
Contact:

Post by romanmir »

I too, am having this problem, most notably with the Accuweather php script.

Code: Select all

temperature:36 humidity:85 windgusts:4 windspeed:11 visibility:10 realfeel:41 uvindex:0 pressure:30.00 precip: 0.00
is what I get from a command-line invocation..

Code: Select all

 02/28/2007 10:30:07 PM - CMDPHP: Poller[0] Host[4] DS[32] WARNING: Result from CMD not valid. Partial Result: temperature:36 humid
02/28/2007 10:30:06 PM - CMDPHP: Poller[0] Host[4] DS[27] WARNING: Result from CMD not valid. Partial Result: temperature:36 humid
02/28/2007 10:30:05 PM - CMDPHP: Poller[0] Host[4] DS[26] WARNING: Result from CMD not valid. Partial Result: temperature:36 humid
is what I get in the log using the wanings filter..

Anybody know what the problem seems to be, or how to fix it?

Cacti 0.8.6j, ubuntu 6.10(edgy), PHP Version 5.1.6
User avatar
za
Posts: 44
Joined: Thu Nov 09, 2006 10:39 am

so?!?!

Post by za »

And so? Somebody can help us ?

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

Post by gandalf »

Please follow instructions of my first signature link (or see documentation tab of cacti sites)
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests