PHP script + multiple result = trouble

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

Moderators: Moderators, Developers

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

PHP script + multiple result = trouble

#1 Post by za » Wed Feb 28, 2007 6:26 am

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

#2 Post by soulshepard » Wed Feb 28, 2007 7:19 am

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: 29
Joined: Thu Nov 09, 2006 10:39 am

#3 Post by za » Wed Feb 28, 2007 7:34 am

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:

#4 Post by romanmir » Thu Mar 01, 2007 1:33 am

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: 29
Joined: Thu Nov 09, 2006 10:39 am

so?!?!

#5 Post by za » Fri Mar 09, 2007 11:10 am

And so? Somebody can help us ?

ZA :-?

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

#6 Post by gandalf » Sat Mar 10, 2007 4:30 am

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

Post Reply