Autom8 V0.33

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:

Post by gandalf »

Please find new beta2 attached.
It's quite verbose ...
R.
Attachments
autom8-v0.35-beta2.tgz
(965.33 KiB) Downloaded 124 times
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

Hi,

Thanks for the update. Unfortunately it didn't solve my problem.

I've still the same error logs entry in cacti log file :

Code: Select all

06/14/2010 11:32:46 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select graph_tree_items.id, graph_tree_items.title, graph_tree_items.order_key from graph_tree_items where graph_tree_items.graph_tree_id=|arg1:tree_id| and graph_tree_items.title != '' order by graph_tree_items.order_key"
06/14/2010 11:32:04 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select graph_tree_items.id, graph_tree_items.title, graph_tree_items.order_key from graph_tree_items where graph_tree_items.graph_tree_id=|arg1:tree_id| and graph_tree_items.title != '' order by graph_tree_items.order_key" 
I don't see other logs, event with log level in "Devel". Just tell me if I can help for something.

Vince
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Did you not update lib/html_utility.php?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

Oh my bad :oops: you right the Witness...

Now everything seems to run. I'll test all and update asap

Thank for your help
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

Ok,

My first attempt seems to demonstrate the following problem: the plugin don't care about eligible host when running tree rules.

You can find an exemple below. I've select two device in the console and done an "apply autom8 rules". I've only two tree rules that you can see after.

Note: If I make a "show eligible hosts" I really see only the hosts that I want
Attachments
tree_rules_bck.gif
tree_rules_bck.gif (15.19 KiB) Viewed 3792 times
tree_rules_backbone.gif
tree_rules_backbone.gif (23.14 KiB) Viewed 3792 times
As you can see, all hosts are present in all subtree.<br /><br />You can also note that the &amp;quot;mbei01frw&amp;quot; isn't eligible by any tree rule but it also present in each subtree
As you can see, all hosts are present in all subtree.

You can also note that the &quot;mbei01frw&quot; isn't eligible by any tree rule but it also present in each subtree
tree_rules_result.gif (1.86 KiB) Viewed 3795 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

killshoot wrote:Oh my bad :oops: you right the Witness...

Now everything seems to run. I'll test all and update asap

Thank for your help
This is which version of Cacti? Which set of patches did you apply?
R.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

killshoot wrote:Ok,

My first attempt seems to demonstrate the following problem: the plugin don't care about eligible host when running tree rules.

You can find an exemple below. I've select two device in the console and done an "apply autom8 rules". I've only two tree rules that you can see after.

Note: If I make a "show eligible hosts" I really see only the hosts that I want
Thanks for the hint. Please attach a cacti.log, filtered for "AUTOM8" of such an action. You will at least have MEDIUM logging level active.
But for this time, I assume that I have a clue.
R.
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

Hi,

I'm using cacti 0.87e with PIA 2.4.

I've applied all patch for version 0.33. When I'm making a patch with v.035 I've a msg that say my files are already patched,

I've done the same tests as before with one eligible host (xbebeiappbckv01 with cacti ID 2585) and one not eligible (mbel01frw with cacti ID 2421).

Below the requested log:

Code: Select all

06/14/2010 06:58:26 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_prepare called
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute called
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute called, action: plugin_autom8_device
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute, items: a:2:{i:0;s:4:\"2421\";i:1;s:4:\"2585\";}
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[2421]
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[2421], sql: SELECT graph_templates.id, graph_templates.name FROM (graph_templates,host_graph) WHERE graph_templates.id=host_graph.graph_template_id AND host_graph.host_id=2421 AND graph_templates.id NOT IN (SELECT graph_local.graph_template_id FROM graph_local WHERE host_id=2421)
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[2421], dq: 1
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] execute_data_query Host[2421] - sql: SELECT plugin_autom8_graph_rules.id, plugin_autom8_graph_rules.name, plugin_autom8_graph_rules.snmp_query_id, plugin_autom8_graph_rules.graph_type_id FROM plugin_autom8_graph_rules WHERE snmp_query_id=1 AND enabled='on'  - found: 3
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[2421], dq: 17
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] execute_data_query Host[2421] - sql: SELECT plugin_autom8_graph_rules.id, plugin_autom8_graph_rules.name, plugin_autom8_graph_rules.snmp_query_id, plugin_autom8_graph_rules.graph_type_id FROM plugin_autom8_graph_rules WHERE snmp_query_id=17 AND enabled='on'  - found: 0
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[2421], dq: 18
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] execute_data_query Host[2421] - sql: SELECT plugin_autom8_graph_rules.id, plugin_autom8_graph_rules.name, plugin_autom8_graph_rules.snmp_query_id, plugin_autom8_graph_rules.graph_type_id FROM plugin_autom8_graph_rules WHERE snmp_query_id=18 AND enabled='on'  - found: 0
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[2421], create_tree for host: 2421
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] execute_device_create_tree, Matching rule 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=3 matches: 2
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] create_all_header_nodes called: Item 2421 sql: SELECT * FROM plugin_autom8_tree_rule_items WHERE plugin_autom8_tree_rule_items.rule_id=10 ORDER BY sequence matches: 1 items
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] create_all_header_nodes called: Item 2421 sql: SELECT * FROM plugin_autom8_tree_rule_items WHERE plugin_autom8_tree_rule_items.rule_id=11 ORDER BY sequence matches: 1 items
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[2585]
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[2585], sql: SELECT graph_templates.id, graph_templates.name FROM (graph_templates,host_graph) WHERE graph_templates.id=host_graph.graph_template_id AND host_graph.host_id=2585 AND graph_templates.id NOT IN (SELECT graph_local.graph_template_id FROM graph_local WHERE host_id=2585)
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[2585], dq: 1
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] execute_data_query Host[2585] - sql: SELECT plugin_autom8_graph_rules.id, plugin_autom8_graph_rules.name, plugin_autom8_graph_rules.snmp_query_id, plugin_autom8_graph_rules.graph_type_id FROM plugin_autom8_graph_rules WHERE snmp_query_id=1 AND enabled='on'  - found: 3
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[2585], create_tree for host: 2585
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] execute_device_create_tree, Matching rule 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=3 matches: 2
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] create_all_header_nodes called: Item 2585 sql: SELECT * FROM plugin_autom8_tree_rule_items WHERE plugin_autom8_tree_rule_items.rule_id=10 ORDER BY sequence matches: 1 items
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] create_all_header_nodes called: Item 2585 sql: SELECT * FROM plugin_autom8_tree_rule_items WHERE plugin_autom8_tree_rule_items.rule_id=11 ORDER BY sequence matches: 1 items
06/14/2010 06:58:28 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute exits
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

So this is NOT autom8-v.035 beta2?
Then, please switch to that code. No need to apply patches again.
R.
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

What? In my PIA I can see 0.35.

Do I need to completely uninstall v0.33 and remove file then reinstall v0.35 beta 2?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

killshoot wrote:What? In my PIA I can see 0.35.
This is ok. You were talking about 0.33 in one of your last posts. So I assumed you were using an old version ...
Have to revisit the code, then ... :cry:
R.
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

Ok. If I can help you for something don't hesitate to ask.

Regards,

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

Post by gandalf »

Evaluation of matching rules was incorrect. Please try attached beta3
R.
Attachments
autom8-v0.35b3.tgz
(965.51 KiB) Downloaded 259 times
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

Hi,

Good news, my first tests seems to run smoothly :D The problem for tree is corrected

I'll do some more tests and report you the result.

Have a nice day

Vince

EDIT : I've done some tests with tree creation with around 3000 devices and it look very promising
:D
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

Hi,

I've done some more tests and I've an "possible" issue with multiple and/or statement as you can see:

If I separate the rules, I can see eligible hosts but if I try to merge it I'haven't anymore eligible host. Am I wrong with the "syntax"?

Regards,

Vince
Attachments
If a merge statement that doesn't run anymore
If a merge statement that doesn't run anymore
rules_1_2.gif (39.27 KiB) Viewed 3679 times
rules_2.gif
rules_2.gif (54.22 KiB) Viewed 3679 times
rules_1.gif
rules_1.gif (45.01 KiB) Viewed 3679 times
Locked

Who is online

Users browsing this forum: No registered users and 1 guest