cacti version 0.8.6j on a FC5
the script
Code: Select all
<?php
$no_http_headers = true;
/* display No errors */
error_reporting(E_ERROR);
include_once(dirname(__FILE__) . "/../include/config.php");
if (!isset($called_by_script_server)) {
print call_user_func("ss_rand");
}
function ss_rand() {
$nr=rand(1, 10);
return $nr;
}
i tested the script in script_server.php with the comand line: <path_cacti>/scripts/ss_rand.php ss_rand
all good, it outputs random numbers.
my problem is that when i try to import the data in cacti nothing works.
error:
CMDPHP: Poller[0] Host[0] DS[73] WARNING: Result from SERVER not valid. Partial Result: WARNING: Function do
PHPSVR: Poller[0] WARNING: Function does not exist
PHPSVR: Poller[0] WARNING: PHP Script File to be included, does not exist
the data input method:
Input Type: Script server php
Input String: php <path_cacti>/scripts/ss_rand.php ss_rand
also tried with input type script command, still same error, am i doing something wrong ? and pls don't send me to how to's there's no php input example there and i don't know perl to make scripts but i can work my way around php.
Can anyone help me with my little problem?
Fireball