i need a graph which shows the availability of a device, therefore i made the following script:
Code: Select all
<?php
mysql_connect( "localhost", "root", "mysqlroot" );
mysql_select_db("cacti");
$ausgabe = "SELECT status from host WHERE id=2";
$result = mysql_query( $ausgabe );
$datensatz = mysql_fetch_row ($result );
foreach ( $datensatz as $wert)
if ( $wert > 2 )
echo 1;
else echo 0;
?>
2.
my debugs are ok. rrdtool says ok and there are no errors at the debug of my data source.
the graph is there but no values ... i get NaN. any ideas what i can do or where i have to start with searching?
greets