Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Aug 23, 2017 6:30 pm

All times are UTC - 5 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Cacti graph not showing
PostPosted: Tue Aug 07, 2012 1:29 am 

Joined: Fri Jun 01, 2012 4:05 am
Posts: 2
I have created php script for cacti which outputs data in format like:

Output of my script: temperature:20 humidity:15 Then I created data input method where input string is:
php <path_cacti>/scripts/getTempHumData.php <host>
Script is placed in cacti folder / scripts.
Input field is hostname - in script I use it as $ARGV[0] variable.
Output fields are two - temperature and humidity.
Then I assigned that script to device, added everything it needed, turned off SNMP usage for device. Device status is 'up'.
Then I created graph template and graph and assigned it to graph tree. But graph cannot be seen - it just shows that image cannot be found (that small red x in browser).
I edited my script to pass contant values in the same format, I looked in cacti/log/cacti.log but there is no entries with my host IP.
Also, there are no rrd file which graph needs - in debug mode it tries to create, but there is no rrd file created. Also in data source path rrd file which is pointed does not exists.
How can I solve this error?
Thank You in advance.

Script code:

/*$content = file_get_contents("http://".$ARGV[0]);
$air_temperature = null;
$air_humidity = null;

$xml = simplexml_load_string($content);
$air_temperature = $xml->Item[1]->Value;
$air_humidity = $xml->Item[2]->Value;

echo "temperature:".$air_temperature." humidity:".$air_humidity;*/
echo "temperature:20 humidity:15";

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group