Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Discovery - create aditional graphs

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin General
Author Message
wizzard13



Joined: 10 Apr 2008
Posts: 4

PostPosted: Thu Apr 10, 2008 11:05 am    Post subject: Discovery - create aditional graphs Reply with quote

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
Back to top
wizzard13



Joined: 10 Apr 2008
Posts: 4

PostPosted: Fri Apr 11, 2008 3:48 am    Post subject: Reply with quote

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
Back to top
wizzard13



Joined: 10 Apr 2008
Posts: 4

PostPosted: Wed Apr 16, 2008 3:33 am    Post subject: Reply with quote

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.
Back to top
wizzard13



Joined: 10 Apr 2008
Posts: 4

PostPosted: Wed Apr 16, 2008 10:33 am    Post subject: Reply with quote

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;
}
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin General All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group