krbian
12th September 2005, 16:38
Bonjour,
J'utilise depuis peu rrdtool 1.2.
J avais deja mes graphs definis dans oreon avec rrdtool 1.
Une fois l upgrade rrdtool effectué, je me suis rendu compte que l'on ne pouvait pas chosir dans le formulaire de configuration des graphs le format de l image, il est forcé a GIF.
Malheureument, lors de l utilisation de ce format rrdtool ecrit dans /var/log/apache2/error.log : ERROR unsupported graphics format 'GIF'
Lorsque je modifie l'url du graph.php en mettant imgformat=PNG l'image s'affiche.
en fouillant un peu dans le code, j ai trouvé :
./include/graph/graph_c.php ligne 72 a 82
if (!strcmp($imgFormat[$i], "PNG") && !strcmp($oreon->optGen->rrdtool_version, "1.2"))
;
else
{
echo "<option value='".$imgFormat[$i]."'";
if (isset($_POST["model"]) && $_POST["model"] && !strcmp($graphModels[$_POST["model"]]->get_imgformat(), $imgFormat[$i]))
echo " selected";
else if (!isset($_POST["model"]) && !strcmp($imgFormat[$i], $graphs[$gr]->get_imgformat()))
echo " selected";
echo ">".$imgFormat[$i]."</option>";
}
Il y a une raison pour empecher rrdtool 1.2 à utiliser le format PNG?
après modif ca donne ca
//if (!strcmp($imgFormat[$i], "PNG") && !strcmp($oreon->optGen->rrdtool_version, "1.2"))
// ;
//else
//{
echo "<option value='".$imgFormat[$i]."'";
if (isset($_POST["model"]) && $_POST["model"] && !strcmp($graphModels[$_POST["model"]]->get_imgformat(), $imgFormat[$i]))
echo " selected";
else if (!isset($_POST["model"]) && !strcmp($imgFormat[$i], $graphs[$gr]->get_imgformat()))
echo " selected";
echo ">".$imgFormat[$i]."</option>";
//}
pour info j utilise une debian sarge, oreon 1.2RC3 et nagios 1.2
J'utilise depuis peu rrdtool 1.2.
J avais deja mes graphs definis dans oreon avec rrdtool 1.
Une fois l upgrade rrdtool effectué, je me suis rendu compte que l'on ne pouvait pas chosir dans le formulaire de configuration des graphs le format de l image, il est forcé a GIF.
Malheureument, lors de l utilisation de ce format rrdtool ecrit dans /var/log/apache2/error.log : ERROR unsupported graphics format 'GIF'
Lorsque je modifie l'url du graph.php en mettant imgformat=PNG l'image s'affiche.
en fouillant un peu dans le code, j ai trouvé :
./include/graph/graph_c.php ligne 72 a 82
if (!strcmp($imgFormat[$i], "PNG") && !strcmp($oreon->optGen->rrdtool_version, "1.2"))
;
else
{
echo "<option value='".$imgFormat[$i]."'";
if (isset($_POST["model"]) && $_POST["model"] && !strcmp($graphModels[$_POST["model"]]->get_imgformat(), $imgFormat[$i]))
echo " selected";
else if (!isset($_POST["model"]) && !strcmp($imgFormat[$i], $graphs[$gr]->get_imgformat()))
echo " selected";
echo ">".$imgFormat[$i]."</option>";
}
Il y a une raison pour empecher rrdtool 1.2 à utiliser le format PNG?
après modif ca donne ca
//if (!strcmp($imgFormat[$i], "PNG") && !strcmp($oreon->optGen->rrdtool_version, "1.2"))
// ;
//else
//{
echo "<option value='".$imgFormat[$i]."'";
if (isset($_POST["model"]) && $_POST["model"] && !strcmp($graphModels[$_POST["model"]]->get_imgformat(), $imgFormat[$i]))
echo " selected";
else if (!isset($_POST["model"]) && !strcmp($imgFormat[$i], $graphs[$gr]->get_imgformat()))
echo " selected";
echo ">".$imgFormat[$i]."</option>";
//}
pour info j utilise une debian sarge, oreon 1.2RC3 et nagios 1.2