Creation of double graphs and data sources with Autom8

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

alkman82
Cacti User
Posts: 50
Joined: Tue Dec 15, 2009 7:32 am
Location: Athens

Creation of double graphs and data sources with Autom8

Post by alkman82 »

Hi guys,

For one more time I am a bit confused and I need your help please. I use Cacti Version: 0.8.7g, Plugin Architecture Version: 2.9 and Autom8 0.35b6 and I noticed that sometimes I had double graphs. I thought that maybe it was a matter of some difference in the data sources so I tryed to have a test with a specific host.

I deleted every traffic graph with all related data sources and I tried to reindex this device just to recreate every traffic graph based on autom8 rules. After this I had 2 graphs for every interface with a separate data source and rrd file each. I noticed that the names of the first graphs was based on the "data query -> In/Out Bits (64-bit Counters)" format (|host_description| -Tr- |query_ifName| - |query_ifAlias| ) and are fully functional and on the other hand the doubled graphs had names based on the data template - interface traffic (|host_description|-|query_ifName|-|query_ifAlias|-Traffic) and they remain for ever empty. I can upload a screenshot if requested.

I read the manual to clear what is the purpose of "data templates" and "data queries" but I am still in a grey cloud. Any help would be appreciated!

*last edit: None of my graphs now is functional. :(
thank you!
Last edited by alkman82 on Sat Dec 03, 2011 12:44 pm, edited 1 time in total.
alkman82
Cacti User
Posts: 50
Joined: Tue Dec 15, 2009 7:32 am
Location: Athens

Re: Creation of double graphs and data sources with Autom8

Post by alkman82 »

No ideas? Has anyone else the same problem?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Creation of double graphs and data sources with Autom8

Post by TheWitness »

PM Gandalf.
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?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Creation of double graphs and data sources with Autom8

Post by gandalf »

I already saw similar complaints in the past.
ALL of them were related to different graph templates for interface traffic being used.
E.g. in case you graph 32 bit counters, a 64 bit counter graph of the same interface is a second and different graph.

But nevertheless, here's how to start debugging:
- select a single host were issues are happening
- delete all interface graph Data Sources along with the related graphs
- enable AUTOM8 logging (see Settings) and set logging level to a high value
- visit the device in question on the "Host" list screen
- check that device
- wait until the poller has completed (we do not want to see poller related entries)
- select action "Apply Autom8 Rule(s) to Device(s)", do this twice (allow for some seconds between both runs) to find out, whether two graphs are created
- complete this task before the next poller run
- grep for "AUTOM8" in log/cacti.log

This is a quite detailed trace of what cacti is doing here. In case two graph rules apply or a second graph is created from the second run, we should see that here.
R.
alkman82
Cacti User
Posts: 50
Joined: Tue Dec 15, 2009 7:32 am
Location: Athens

Re: Creation of double graphs and data sources with Autom8

Post by alkman82 »

Thank you Gandalf!I ll try this and I ll post the results as soon as possible.
alkman82
Cacti User
Posts: 50
Joined: Tue Dec 15, 2009 7:32 am
Location: Athens

Re: Creation of double graphs and data sources with Autom8

Post by alkman82 »

Hi Gandalf,
Here is my outcome:
1. In my cacti I have deleted the "32 bit counters" data query to avoid problems because we use it never. So the creation of such a graph is impossible.
2. I deleted all graphs for the test host, I did all log setting both with HIGH and DEBUG level as you said but after the rules applications nothing was logged in my cacti.log despite the creation of new graphs (included the doubled).
3. I noticed that autom8 can write in my cacti.log so I guess it is not a matter of rights.
4. I have 3 graph rules defined for 3 different kind of devices but none of them comes in conflict with another (checked many times with the "view matching hosts" filter).
5. All defined rules are specified to use "64 bit counters" data query.
6. All doubled/wrong graphs are created at the same time with the right graphs. We can notice it also from the graph id number which are all serial.

Do you thing it may be a matter of wrong autom8 patch application? How can I check if everything is patched ok?
I attach you a screenshot with the new created graphs sorted by ID. Notice the order that are created.
Attachments
graphs_sorted_by_id.JPG
graphs_sorted_by_id.JPG (151.28 KiB) Viewed 2703 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Creation of double graphs and data sources with Autom8

Post by gandalf »

Let me first see your "Settings" for AUTOM8.
Yes, of course wrong patches may cause weird issues. But without the debug, we never will know
R.
alkman82
Cacti User
Posts: 50
Joined: Tue Dec 15, 2009 7:32 am
Location: Athens

Re: Creation of double graphs and data sources with Autom8

Post by alkman82 »

Here are my settings and all my rulles:
Attachments
rules.JPG
rules.JPG (46.01 KiB) Viewed 2692 times
settings.JPG
settings.JPG (36.5 KiB) Viewed 2692 times
alkman82
Cacti User
Posts: 50
Joined: Tue Dec 15, 2009 7:32 am
Location: Athens

Re: Creation of double graphs and data sources with Autom8

Post by alkman82 »

I noticed that this issue exists only for one kind of my devices. The bras boxes. So I was testing my rule but with no luck. I attach you this rule just to check it. Do you think it is may be a matter of a bad rule? The matching graphs and hosts looks right.
I want to graph:
all Bras interfaces that is up,
are Ethernet or ATM or POS
and are NOT subinterfaces, tunnels, mpls, or l2tp tunnels.

*the attached is a new rule that I was testing with the same luck.
Attachments
rule1.JPG
rule1.JPG (65.53 KiB) Viewed 2690 times
alkman82
Cacti User
Posts: 50
Joined: Tue Dec 15, 2009 7:32 am
Location: Athens

Re: Creation of double graphs and data sources with Autom8

Post by alkman82 »

Gandalf are you back?? :roll:
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Creation of double graphs and data sources with Autom8

Post by gandalf »

Please remove the "." test for a try. I fear, that regexp may have issues with that.
To know better, we still need the AUTOM8 debug ... This will show the whole regexp that is derived from your rule
R.
alkman82
Cacti User
Posts: 50
Joined: Tue Dec 15, 2009 7:32 am
Location: Athens

Re: Creation of double graphs and data sources with Autom8

Post by alkman82 »

I removed "." from the rule but nothing...
I still have no logs in my cacti.log (I have been set the level in "debug" for autom8 in my misc settings)
:(
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Creation of double graphs and data sources with Autom8

Post by gandalf »

Is your web server's user allowed to update cacti.log? If not, we won't receive any log entries from web interaction.
R.
alkman82
Cacti User
Posts: 50
Joined: Tue Dec 15, 2009 7:32 am
Location: Athens

Re: Creation of double graphs and data sources with Autom8

Post by alkman82 »

ok Gandalf the log was just a matter of file rights. I thought it was the cacti user that was needed to has write access :-? . I attach you the debug log of my AUTOM8 actions. In that log, you will notice that I have only 2 rules enables (the ones that have the problem.). Finally I added back the "." after I saw that it wasn't the cause of the problem.


Many thanks for your help you gave me until now!
Attachments
AUTOM8.txt
(18.01 KiB) Downloaded 174 times
alkman82
Cacti User
Posts: 50
Joined: Tue Dec 15, 2009 7:32 am
Location: Athens

Re: Creation of double graphs and data sources with Autom8

Post by alkman82 »

Mystery solved!!!!Too much pain for that... Finally it was a matter of "wrong" rules. All my rules was based on "ifdescr". The problem was that a juniper Bras when returns it's interfaces , for some reason it gives two times one interface. For an Ethernet interface for example gives one record with iFtype: "ethernetCsmacd" and one with iFtype:"l2vlan"......So autom8 was reading two intefaces...

So I created rules based on ifType and worked fine! :lol:

sorry for the whole mess and thanks for your support! :roll:
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests