Poller don't run PHP script

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

Moderators: Developers, Moderators

Post Reply
krpaum
Posts: 13
Joined: Mon Apr 21, 2008 2:09 am

Poller don't run PHP script

Post by krpaum »

Hi, my poller is not running my PHP script. How can i solve this problem
krpaum
Posts: 13
Joined: Mon Apr 21, 2008 2:09 am

Post by krpaum »

I found this in cacti log file PHPSVR: Poller[0] WARNING: Function does not exist
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This error is related to using PHP Script Server, not a plain script. Please tell us, whether you want to implement a plain script or a script server script. Please find some help at the 1st link of my sig
Reinhard
krpaum
Posts: 13
Joined: Mon Apr 21, 2008 2:09 am

Post by krpaum »

Hi, Gandalf I sorry about my crosspost I new to this webboard. I don't what the exactly different between PHP script server and plain server. I use PHP code to call VBscript this is my code.

<?php

# $argv[1] is a host
# $argv[2] is username
# $argv[3] is password

$do_not_read_config = true;




$Return = `cscript //Nologo newts-session.vbs /s $argv[1] /u $argv[2] /p $argv[3]`;

print trim($Return);

?>

and I have try on perl script and this error shows
"ERROR: the RRD does not contain an RRA matching the chosen CF"
how can I fix this problem.

Thank so much for your help
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Again, please read 1st link of my sig. It shows almost all approaches on how to extend cacti, be it a script, a script server script or a Data Query.
From your example, I see you've created a script. But I suppose you've selected it to be a "Script Server Script" in the "Data Input Method" dialogue.

The second issue is related to using a CF (e.g. LAST) but defining the rrd file without this exact CF. Some examples of using this is also published at the 1st link of my sig (rrdtool chapter)
Reinhard
krpaum
Posts: 13
Joined: Mon Apr 21, 2008 2:09 am

Post by krpaum »

now my graph is show all 0 I can't fix this. I already changed data input method to script server(PHP). and CF to I used average
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Perhaps I made myself not plain enough.
The code you've posted is valid, but this would be a "Script".

You may use a "Script Server Script" as well, but that requires some change in the code. The change is explained in the Cacti manual, and an example is shown in the HowTo Section.

Please avoid mixing both approaches
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests