Autom8 V0.31 [Nov, 20 2009]

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Locked
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Autom8 V0.31 [Nov, 20 2009]

Post by gandalf »

As a next step in Cacti automatization, I've just submitted a new plugin called AUTOM8.

Features
  • create new graphs automatically
  • create new tree entries automatically
  • Rules are executed in following cases:
    • a cli script is called (e.g. add_device.php, add_graph.php, …)
    • a Re-Index is performed on a Data Query. This includes poller_reindex_hosts.php
    • A new Host is created. In this case, Rules for _ALL_ associated Data Queries are executed one after the other
    • Simple Graph Templates will be evaluated to create those graphs in any event.
Find everything, including a 30 page manual, at http://docs.cacti.net/plugin:autom8

All documentation and updates will be made to the link given. Please post problems and questions to this thread.

Reinhard
Last edited by gandalf on Thu Mar 11, 2010 5:34 pm, edited 3 times in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

If the plugin was tested with PA 2.4, does that mean the patches only work on Cacti 0.8.7d?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Howie wrote:If the plugin was tested with PA 2.4, does that mean the patches only work on Cacti 0.8.7d?
Answering my own question: host.php.patch and lib_api_device.php.patch both fail on my test 0.8.7e install. This plugin sounds very cool though :-)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Howie wrote:
Howie wrote:If the plugin was tested with PA 2.4, does that mean the patches only work on Cacti 0.8.7d?
Answering my own question: host.php.patch and lib_api_device.php.patch both fail on my test 0.8.7e install. This plugin sounds very cool though :-)
That is likely. 087e was surprising me, else I would have added the hooks to it.
But all patches are very small; most of them only adding a hook.
Reinhard
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

gandalf wrote:
Howie wrote:
Howie wrote:If the plugin was tested with PA 2.4, does that mean the patches only work on Cacti 0.8.7d?
Answering my own question: host.php.patch and lib_api_device.php.patch both fail on my test 0.8.7e install. This plugin sounds very cool though :-)
That is likely. 087e was surprising me, else I would have added the hooks to it.
But all patches are very small; most of them only adding a hook.
Reinhard
I see what you mean. The patches aren't quite fuzzy enough with line numbers, that's all. I added those two manually.

This is a fantastic plugin! If only it did thold templates too, then I could take the afternoons off ;-)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Howie wrote:This is a fantastic plugin!
Thanks for the flowers. Improvements are still welcome; I only hesitate to manage a different plugin using autom8.
Reinhard
User avatar
tilli
Posts: 22
Joined: Tue Jul 14, 2009 9:16 am

Post by tilli »

I am having difficulty installing and unpacking this plugin..

can you please tell me how to download it directly to my machine using the wget command.

thanks for your help..
Cacti Version - 0.8.7d
Plugin Architecture - 2.4
RRDTool Version - RRDTool 1.2
Plugins - discovery, autom8, tools
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Select the link above to find all informations about that plugin, including the download itself
Reinhard
brylant
Posts: 36
Joined: Mon Aug 17, 2009 9:05 am

SQL Cell failed

Post by brylant »

I'm getting this when trying to reindex ospf areas:
10/13/2009 02:24:19 PM - AUTOM8: Poller[0] Host[14] Graph Added - graph-id: (5526) - data-source-ids: (5596, 5596)
10/13/2009 02:24:19 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1064', SQL:"SELECT DISTINCT data_local.id FROM data_local LEFT JOIN data_template_data ON (data_local.id=data_template_data.local_data_id) LEFT JOIN data_input_data ON (data_template_data.id=data_input_data.data_template_data_id) LEFT JOIN data_input_fields ON (data_input_data.data_input_field_id=data_input_fields.id) LEFT JOIN snmp_query_graph ON (data_input_data.value=snmp_query_graph.id) WHERE data_input_fields.type_code='output_type' AND snmp_query_graph.id=24 AND data_local.host_id=14 AND data_local.snmp_query_id=13 AND data_local.snmp_index=0.0.0.210"
10/13/2009 02:24:19 PM - AUTOM8: Poller[0] Host[14] create_dq_graphs - checking index: 0.0.0.210
10/13/2009 02:24:19 PM - AUTOM8: Poller[0] Host[14] create_dq_graphs - graph template: 46
10/13/2009 02:24:19 PM - AUTOM8: Poller[0] Host[14] create_dq_graphs - snmp query: 13 - rule: OSPF Areas - SPF Runs
10/13/2009 02:24:19 PM - AUTOM8: Poller[0] Host[14] execute_data_query - create sql: SELECT host.id AS host_id, host.hostname, host.description, host_template.name AS host_template_name FROM host LEFT JOIN host_template ON (host.host_template_id = host_template.id) WHERE ( host.description IS NOT NULL AND host_template.name LIKE '%Router%') AND host.id=14 matches:1
10/13/2009 02:24:19 PM - AUTOM8: Poller[0] Host[14] execute_data_query - rule=7 name: OSPF Areas - SPF Runs

Any idea?
When I reindex - the plugin just adds another graph (even though nothing has changed...)

Thanks,
Adam
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

1064 is a syntax error. It looks like that last index should be in quotes in the SQL statement (0.0.0.210). snmp_index is a varchar, not an int.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
brylant
Posts: 36
Joined: Mon Aug 17, 2009 9:05 am

Post by brylant »

yep.. looks like this helps (in autom8_functions.php line 424)

Code: Select all

 . ' AND data_local.snmp_index=\'' . $snmp_query_array["snmp_index"] . '\'';
grazog
Posts: 13
Joined: Fri May 02, 2008 3:11 am

Post by grazog »

Hello,
It's an amazing plugin for environments that change a lot.
Still i have an issue when using graph leaf on the tree rules : graph are added at the root tree level instead of being added in a subtree.
Here are the logs i have :

10/16/2009 09:31:36 AM - AUTOM8: Poller[0] Host[179] execute_graph_create_tree - graph: 1172
10/16/2009 09:31:36 AM - AUTOM8: Poller[0] Host[179] execute_graph_create_tree - sql: SELECT plugin_autom8_tree_rules.id, plugin_autom8_tree_rules.name, plugin_autom8_tree_rules.tree_id, plugin_autom8_tree_rules.tree_item_id, plugin_autom8_tree_rules.leaf_type, plugin_autom8_tree_rules.host_grouping_type, plugin_autom8_tree_rules.rra_id FROM plugin_autom8_tree_rules WHERE enabled='on' AND leaf_type=2
10/16/2009 09:31:36 AM - AUTOM8: Poller[0] Host[179] execute_graph_create_tree - rule: 4 name: LB-Graph type: 2
10/16/2009 09:31:36 AM - AUTOM8: Poller[0] Host[179] execute_graph_create_tree - sql: SELECT graph_templates_graph.id, graph_templates_graph.local_graph_id, graph_templates_graph.height, graph_templates_graph.width, graph_templates_graph.title_cache, graph_templates.name, graph_local.host_id FROM (graph_local,graph_templates_graph) LEFT JOIN graph_templates ON (graph_local.graph_template_id=graph_templates.id) LEFT JOIN host ON (graph_local.host_id = host.id) LEFT JOIN host_template ON (host.host_template_id = host_template.id) WHERE graph_local.id=graph_templates_graph.local_graph_id AND ( host_template.name REGEXP 'BigIP' AND graph_templates.name REGEXP 'VS Traffic') AND graph_local.id=1172
10/16/2009 09:31:36 AM - AUTOM8: Poller[0] Host[1172] create_all_header_nodes - items sql: SELECT * FROM plugin_autom8_tree_rule_items WHERE plugin_autom8_tree_rule_items.rule_id=4 ORDER BY sequence matches: 2
10/16/2009 09:31:36 AM - AUTOM8: Poller[0] Host[1172] create_all_header_nodes - sql: SELECT host.description AS source FROM host LEFT JOIN host_template ON (host.host_template_id = host_template.id) LEFT JOIN graph_local ON (host.id = graph_local.host_id) LEFT JOIN graph_templates ON (graph_local.graph_template_id=graph_templates.id) LEFT JOIN graph_templates_graph ON (graph_local.id = graph_templates_graph.local_graph_id) WHERE host.id=1172 AND graph_templates_graph.local_graph_id > 0 AND ( host_template.name REGEXP 'BigIP' AND graph_templates.name REGEXP 'VS Traffic') matches:
10/16/2009 09:31:36 AM - AUTOM8: Poller[0] Host[1172] create_all_header_nodes - sql: SELECT graph_templates_graph.title_cache AS source FROM host LEFT JOIN host_template ON (host.host_template_id = host_template.id) LEFT JOIN graph_local ON (host.id = graph_local.host_id) LEFT JOIN graph_templates ON (graph_local.graph_template_id=graph_templates.id) LEFT JOIN graph_templates_graph ON (graph_local.id = graph_templates_graph.local_graph_id) WHERE host.id=1172 AND graph_templates_graph.local_graph_id > 0 AND ( host_template.name REGEXP 'BigIP' AND graph_templates.name REGEXP 'VS Traffic') matches:
10/16/2009 09:31:36 AM - AUTOM8: Poller[0] Host[179] execute_graph_create_tree - parent: 0
10/16/2009 09:31:36 AM - AUTOM8: Poller[0] Host[179] execute_graph_create_tree - node: 757

From what i saw the function create_all_header_nodes is called with the id of the graph (1172) but it's designed to be called with the host id (179) so the SQL queries give an empty result.
Could it be that in line 505 of autom8_functions.php the WHERE statement should be on the graph ID instead of the host ID ?
Regards,
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I was on vacation. As soon as I find time, I will try to tackle both issues.
R.
gsaray101
Cacti User
Posts: 233
Joined: Thu May 17, 2007 9:18 am

autom8 installation is not working

Post by gsaray101 »

Gandalf,

cacti v: 0.8.7d
I followed your instructions to patch the files. After patching, when I go to devices, I get "http 500" error. When reverse the patch, when I go to graph and thold link, the page is empty. this plugin as per the instructions is not working.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

I'm just implementing this plugin now, and I have one feature request: logging.

It would be great if Autom8 would log when it has done something (added x to tree y, created graph z). At the moment, it logs a lot of SQL queries, but nothing higher-level.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Locked

Who is online

Users browsing this forum: No registered users and 0 guests