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:

Autom8 V0.33

Post by gandalf »

New version posted to 3rd link of my sig; the Cacti plugin repository

Changelog since V0.31:
--- 0.33 ---
- fix: index errors (thanks terziyski)
- fix: no "propagation" flag allowed for host/graph tree items, index error fixed
- fix: remove deprecated php function calls
- fix: html formatting errors fixed
- fix: renaming function calls to make them unique

--- 0.32 ---
- fix: Some missing includes fixed for logging
- fix: fix to broken SQL statement
- fix: filter string was not persistent
Have fun
R.
KyleT
Posts: 16
Joined: Mon Dec 07, 2009 3:52 am

Post by KyleT »

Hi gandalf

I'm having some issues with Autom8 that I am hoping you will be able to help me with.

I'm currently using v0.33 with graph creation working wonderfully. However, I have hit a problem with Tree Creation :(

Problem 1
Manual kick off for tree creation is not working. Refer to screenshot 1, 2 and 3 attached. Nothing in cacti.log either...

When a graph is created, the Tree Rules seems to run and a tree item is created. However, nothing shows in cacti.log

Problem 2
When the tree item is created, an incorrect name is used. Refer to screenshot 4 for rule info.

Now the name used for the new heading is for another graph, not the graph just created. It's like Autom8 is looking at the wrong graph.title_cache entry...

When debugging the rule item (show created trees) the search and replace patterns are working as expected.

Things to note:

-The following two options are ticked in Settings > Misc
Enable Autom8 Graph Creation
Enable Autom8 Tree Item Creation

-No Autom8 Tree Creation actions go in the log, including when it works (when a tree item is created on graph creation).

-There are Autom8 log entries when graphs are created, automatically and when manually forced (Apply Autom8 rules to a device)


Any advice would be greatly appreciated.

Kind Regards
Kyle
Attachments
Apply Autm8 Rules visible and selectable under Graph Management
Apply Autm8 Rules visible and selectable under Graph Management
1.JPG (78.34 KiB) Viewed 10004 times
I am then asked are you sure you want to apply the following rules.... which is empty?
I am then asked are you sure you want to apply the following rules.... which is empty?
2.JPG (6.89 KiB) Viewed 10004 times
My Tree rules, which you can see two are enabled
My Tree rules, which you can see two are enabled
3.JPG (54.15 KiB) Viewed 10004 times
Screenshot of my tree creation rule
Screenshot of my tree creation rule
4.JPG (93.18 KiB) Viewed 10004 times
Cacti 0.8.7g & Spine 0.8.7g on RHEL 5.2 (2.6.18-92.el5)
2x Intel Quad Core Xeon E5345 | 12GB RAM
Graphing 1245 Cisco hosts - 49737 Data Sources
autom8 0.35b7 | Camm 1.6.7 | settings 0.7 | realtime 0.43 | threshold 0.4.2 |
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You are using a THOLD version that has a bug when handling a certain hook (or perhaps a different plugin with the same problem). That's why the confirmation dialogue is empty.
To increase logging, you will find some commented statements that look like

Code: Select all

#cacti_log(...)
Remove the "#" to get more info into the log
R.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Autom8 V0.33

Post by gandalf »

gandalf wrote:New version posted to 3rd link of my sig; the Cacti plugin repository

Changelog since V0.31:
--- 0.33 ---
- fix: index errors (thanks terziyski)
- fix: no "propagation" flag allowed for host/graph tree items, index error fixed
- fix: remove deprecated php function calls
- fix: html formatting errors fixed
- fix: renaming function calls to make them unique

--- 0.32 ---
- fix: Some missing includes fixed for logging
- fix: fix to broken SQL statement
- fix: filter string was not persistent
Have fun
R.
AUTOM8 will log quite a lot when using MEDIUM logging level. grep for "AUTOM8" in cacti.log!
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

Is there a possibilty if some Ports go down (shutdown etc), that autom8 can delete the graphs?
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Sirup wrote:Is there a possibilty if some Ports go down (shutdown etc), that autom8 can delete the graphs?
Not yet. I already thought about deleting stuff. But I wonder how we prevent accidential deleting stuff when e.g. a port is flapping.
Do you have an idea how to prevent that? E.g. counting a certain amount of polling times before deleting?
R.
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

How about a mix between the fields "status_event_count" and "status_fail_date"?
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

Hi all,

The graph part run great by me but I've a problem with the tree rules.

In fact I see my already existing trees, but not the subtrees. I've only "ROOT".

Have I missed something?

Thank you for you help,

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

Post by gandalf »

I'm just debugging some part of that code with the help of a cacti user.
But it all depends an the type of tree rules you're using. So at least a scrennshot of the rule itself and another one of the "estimated" results is required.
I would be able to provide you with a debug version that spits out lots of informations to track any problem down. Please email or pm if you're interested.
R.
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

gandalf wrote:I'm just debugging some part of that code with the help of a cacti user.
But it all depends an the type of tree rules you're using. So at least a scrennshot of the rule itself and another one of the "estimated" results is required.
I would be able to provide you with a debug version that spits out lots of informations to track any problem down. Please email or pm if you're interested.
R.
Hi Gandalf,

Thank you for your reply.

You'll find attached some screeshoot that will explain my problem

As you can see my tree as some subtree branch but I'm not able to "see" them in the tree rules menu.

I've found an error message in cacti log each times that I go in tree rules page:

Code: Select all

05/31/2010 02:24:16 PM - 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"
It seems that we have an mysql syntax error. Maybe here: graph_tree_items.graph_tree_id=|arg1:tree_id|.

I found this code in setup.php line 581 & 616

I will help you with debug version without problem. This plugin is what I've waited since long (~ 3000 devices in my cacti and lots of scripts to automate this).

Regards,

Vince
Attachments
The tree rules menu doesn't allow me to select sub tree
The tree rules menu doesn't allow me to select sub tree
tree_rules.GIF (32.4 KiB) Viewed 8977 times
The tree as  it already exists
The tree as it already exists
cacti_tree.gif (7.94 KiB) Viewed 8977 times
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

Hi,

Do you need more informations?

Regards,

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

Post by gandalf »

Thanks for the pointer.
Part of the problem was already solved but introduced a new problem. I currently have some debugging code that still is not correct but I need time for coding ...
R.
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

Hi,

Just tell me if I can help for something, I'll give so much help that I can.

Unfortunately I only know perl thus php isn't really easy to debug for me.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please use RSS feed for the plugin site to get informed as soon as a new version shows up. Perhaps I'll post a beta before official release
R.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please try attached code. It's not complete, but should solve the original problem. Still, there is at least one known error. So don't use it on a production system
R:
Attachments
autom8-v0.35-beta.tgz
(962.85 KiB) Downloaded 274 times
Locked

Who is online

Users browsing this forum: No registered users and 0 guests