You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to add a graph I get the following error:
$ php add_graphs.php --host-id=5 --graph-type=cg --graph-template-id=35
ERROR: You must supply a --snmp-value or --snmp-value-regex option with --snmp-field
This used to work in cacti-0.8.8h just fine. I can still add the graphs via the WebGUI ("Create Graphs for this Device"), though.
Applying the following patch fixes the problem:
--- a/cli/add_graphs.php+++ b/cli/add_graphs.php@@ -353,8 +353,10 @@ if (sizeof($parms)) {
exit(1);
}
} else {
+/*
echo "ERROR: You must supply a --snmp-value or --snmp-value-regex option with --snmp-field\n";
exit(1);
+*/
}
$index_filter = 0;
@@ -511,7 +513,7 @@ if (sizeof($parms)) {
echo "NOTE: Not Adding Graph - this graph already exists - graph-id: ($existsAlready) - data-source-id: ($dataSourceId)\n";
exit(1);
}else{
- $returnArray = create_complete_graph_from_template($template_id, $host_id, '', $values['cg']);+ $returnArray = create_complete_graph_from_template($template_id, $host_id, null, $values['cg']);
$dataSourceId = '';
}
Commenting the else branch is just a workaround, I'm not sure why this check is performed for cg graphs.
The text was updated successfully, but these errors were encountered:
When trying to add a graph I get the following error:
This used to work in cacti-0.8.8h just fine. I can still add the graphs via the WebGUI ("Create Graphs for this Device"), though.
Applying the following patch fixes the problem:
Commenting the else branch is just a workaround, I'm not sure why this check is performed for cg graphs.
The text was updated successfully, but these errors were encountered: