Autom8 creates host leaf but no graphs are listed

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
fuzzbawl
Posts: 18
Joined: Wed Dec 06, 2006 3:46 pm
Location: South Bend, IN
Contact:

Autom8 creates host leaf but no graphs are listed

Post by fuzzbawl »

Greetings,
I've been using Autom8 for a while now to create graphs and it has been working perfectly! I decided to start using it to add hosts to graph trees but ran into an issue. Tree sub-header entries are created and the host leaf is added, but no graphs appear when you click on the host leaf. If you switch to "preview" mode then the graphs are shown under the host. Cacti log shows that the host was added but no errors:
03/30/2015 01:20:34 PM - AUTOM8: Poller[0] create_header_node Parent[0] Tree Item added - id: (5198) Title: (Anson-638)
03/30/2015 01:20:34 PM - AUTOM8: Poller[0] create_device_node Host[3547] Tree Item added - id: (5204)

Any ideas here? Using Cacti 0.8.8c with autom8 0.35 and PHP 5.3.3 on CentOS 6.6. Screenshots of the tree rules attached.
Attachments
Screenshot 2015-03-30 14.36.25.png
Screenshot 2015-03-30 14.36.25.png (102.25 KiB) Viewed 1776 times
Screenshot 2015-03-30 13.17.46.png
Screenshot 2015-03-30 13.17.46.png (97.82 KiB) Viewed 1776 times
fuzzbawl
Posts: 18
Joined: Wed Dec 06, 2006 3:46 pm
Location: South Bend, IN
Contact:

Re: Autom8 creates host leaf but no graphs are listed

Post by fuzzbawl »

I believe I've found the issue. When you edit an existing tree rule, the "Graph Grouping Style" is blank on the edit form. If you choose "Graph Template" or "Data Query Index" and hit save, it will update the database and the rules work as expected. If you instead make changes to the rules and do not select one of those options for Graph Grouping Style, then it gets set to 0 (zero) in the database which breaks the Cacti functions that add the tree items.

I took a look at the code but couldn't quite figure out why it is doing that. My gut tells me it is something in autom8_tree_rules.php line 894 or related function call on that line. The work around I've found is that once I'm done making changes to my rules I save the rule, then edit it again and I make sure to set "Group Graphing Style" to what it should be and hit save again. Once that is done the rule works perfectly!
Crom
Posts: 1
Joined: Wed Jul 27, 2016 12:41 pm

Re: Autom8 creates host leaf but no graphs are listed

Post by Crom »

Greetings,

Commenting lines 640 and 645 in autom8_tree_rules.php appears to fix the issue

Line 645 is for RRA selection for graph leaf item type which displayed the same behavior.

Please note that it might break something else even though it does not appear to so far (I am no PHP programmer).

Regards,
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest