Hello everyone!
I'm trying to create graphs with discovery plugin, but they don't appear as I'm expecting.
I have defined Host template with associated graph templates 95 percentile and Unicast packest. When discovery is done it creates all graphs on up interfaces for traffic_in and traffic_out but RRDtool says it cannot create graphs for 95 percentile and unicast packets due to No such file or directory error when creating rrd files.
Is it possible to create all those graphs (traffic_in/traffic_out, 95%in/95%out and unicast_in/unicast_out) for up interfaces with just dicovery?
Every setting is ok, I assume, but when debugging snmp queries it only checks the traffic_in/traffic_out for up interfaces. What about 95 percentile graphs which depend on the same snmp queries? For unicast packets it's an enigma for me to create those autmaticaly. I just want to create all three sections of graph at once, not just for traffic in/out.
Is there any place I could define what graphs discovery should create? Is there any option where I could tell Cacti which OIDs to query with it's poller.
When I create those graphs manually they all appear as expected, but automation doesn't work.
I would be very thankful for any explanation of this issue.
Debian linux distribution
Cacti version: 0.8.7a
Discovery plugin version: 0.8.3
RRDTool Version: 1.2.15
SNMP Version: 5.2.3
Poller: cactid
Best regards,
wizz
Discovery - create aditional graphs
Moderators: Developers, Moderators
Ah!
I've figured out how to acomplish this.
I had to create separate Data Queries for 95% and Unicast packets and associate them to Host template instead of associating Graph Templates to Host templates.
Now, other issue comes up. Discovery creates graphs for up interfaces only for traffic_in/traffic_out, but when it comes to 95% and Unicast packets it creates graphs for all interfaces.
Anyone knows why?
wizz
I've figured out how to acomplish this.
I had to create separate Data Queries for 95% and Unicast packets and associate them to Host template instead of associating Graph Templates to Host templates.
Now, other issue comes up. Discovery creates graphs for up interfaces only for traffic_in/traffic_out, but when it comes to 95% and Unicast packets it creates graphs for all interfaces.
Anyone knows why?
wizz
Hi, tnx everyone for trying to help me
I had to change the code to accomplish what I wanted to do.
If you would like discovery to draw more graph types when you set the option to create them for up interfaces (etc. if you create additional data queries) you have to edit findhosts.php and find the line:
if ($snmp_query["id"] == 1 && $graph_interface_only_up)
and change it to:
if ($snmp_query["id"] > 0 && $graph_interface_only_up)
With this line unchanged the Discovery plugin sets snmp_query id to 1 which is id of default snmp_query which came with the Cacti installation ("SNMP - Interface Statistics"), and if you would like to create additional graphs for up interfaces with other snmp_queries it won't look in any other id then that. Weird thing (at least for me) is why is that variable set to 1, but nevermind, it could be a bug.
With this little change you can create other snmp_queries and the graphs for them will be created only for up interfaces, not for all that discovery finds.
I had to change the code to accomplish what I wanted to do.
If you would like discovery to draw more graph types when you set the option to create them for up interfaces (etc. if you create additional data queries) you have to edit findhosts.php and find the line:
if ($snmp_query["id"] == 1 && $graph_interface_only_up)
and change it to:
if ($snmp_query["id"] > 0 && $graph_interface_only_up)
With this line unchanged the Discovery plugin sets snmp_query id to 1 which is id of default snmp_query which came with the Cacti installation ("SNMP - Interface Statistics"), and if you would like to create additional graphs for up interfaces with other snmp_queries it won't look in any other id then that. Weird thing (at least for me) is why is that variable set to 1, but nevermind, it could be a bug.
With this little change you can create other snmp_queries and the graphs for them will be created only for up interfaces, not for all that discovery finds.
Another thing.
If you have problems with space characters in sysName of your Hosts, Discovery and Cacti don't like it and won't let you have them. So you can replace spaces with underscores.
Find this in findhosts.php, and add the bolded line:
/* get system name */
$snmp_sysName = @cacti_snmp_get($device["hostname"], $device["snmp_readstring"],
".1.3.6.1.2.1.1.5.0", $device["snmp_version"],
"", "", "", "", "", "", $device["snmp_port"], $device["snmp_timeout"]);
if (strlen($snmp_sysName) > 0) {
$snmp_sysName = trim(strtr($snmp_sysName,"\""," "));
$snmp_sysName = str_replace(" ", "_", $snmp_sysName);
$device["snmp_sysName"] = $snmp_sysName;
}
If you have problems with space characters in sysName of your Hosts, Discovery and Cacti don't like it and won't let you have them. So you can replace spaces with underscores.
Find this in findhosts.php, and add the bolded line:
/* get system name */
$snmp_sysName = @cacti_snmp_get($device["hostname"], $device["snmp_readstring"],
".1.3.6.1.2.1.1.5.0", $device["snmp_version"],
"", "", "", "", "", "", $device["snmp_port"], $device["snmp_timeout"]);
if (strlen($snmp_sysName) > 0) {
$snmp_sysName = trim(strtr($snmp_sysName,"\""," "));
$snmp_sysName = str_replace(" ", "_", $snmp_sysName);
$device["snmp_sysName"] = $snmp_sysName;
}
Who is online
Users browsing this forum: No registered users and 0 guests