Data Source only works with one host

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

zsnyder
Posts: 36
Joined: Thu Jan 26, 2006 1:06 pm
Location: Seattle, WA

Data Source only works with one host

Post by zsnyder »

I'm fairly new to Cacti, so please forgive me if I'm missing something obvious...

I recently created an Indexed SNMP query to collect per-process CPU statistics from HP Insight agents. The query works fine and I'm able to get good data back... for one host. The first host that I created a graph on worked fine, but the subsequent graphs I try to create all result in a Graph and Data Source that looks like this:
<ServerName> - CPU Usage - |query_cpqProcessName|
As opposed to the host which works correctly, that looks like this:
<ServerName> - CPU Usage - <ServiceName>
In addition, if I actually look in the Data Source I find this under custom data:

Index Type Data query data sources must be created through New Graphs.
Index Value [ EMPTY BOX ]
Output Type ID Data query data sources must be created through New Graphs.

There's also never an RRA created for the data source.

So it appears that Cacti is never actually linking the Data Source to the Device...?

Any help would be greatly appreciated.

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

Post by gandalf »

This is (AFAIK) a known bug. TheWitness is working on this, I suppose
Reinhard
zsnyder
Posts: 36
Joined: Thu Jan 26, 2006 1:06 pm
Location: Seattle, WA

Post by zsnyder »

Reinhard--

I appreciate the reply. Is there any sort of a workaround for this? It's preventing me from collecting some much-needed stats.

Also, if it's a known bug is there a Mantis tracking ID I can watch to track this to resolution? If not, I'd like to create one.

Thanks again--

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

Post by gandalf »

Please see http://bugs.cacti.net/view.php?id=687. But I recommend _not_ to use the "workaround" mentioned here. In a discussion with the devs we agreed, that this is nota correct workaround and may yield unpredictable results
Reinhard
zsnyder
Posts: 36
Joined: Thu Jan 26, 2006 1:06 pm
Location: Seattle, WA

Post by zsnyder »

Any chance of a patch (or a supported work-around) for this? Nearly all of the work I have left to do with Cacti involves Indexed SNMP queries. I know you all are working hard on .9.0, but isn't this a pretty significant bug? Or is it something in the way I'm trying to implement these queries that is causing it to be an issue for me?

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

Post by gandalf »

zsnyder wrote:Any chance of a patch (or a supported work-around) for this? Nearly all of the work I have left to do with Cacti involves Indexed SNMP queries. I know you all are working hard on .9.0, but isn't this a pretty significant bug? Or is it something in the way I'm trying to implement these queries that is causing it to be an issue for me?

Thanks in advance!
Please tell us EACH single step you're going through when creating the graphs. You SHOULD of course goto Devices and Create Graphs for this Host ...
Reinhard
zsnyder
Posts: 36
Joined: Thu Jan 26, 2006 1:06 pm
Location: Seattle, WA

Post by zsnyder »

Yep, that's exactly what I'm doing. See the attached images of my steps. Any help you can give is greatly appreciated.
Attachments
5 - This view is of the Data Sources page.  The same |query_ItmPoolStatName| is displayed here.  In addition, if I check the poller cache, these data sources are never listed.  Cacti never actually queries for the data.
5 - This view is of the Data Sources page. The same |query_ItmPoolStatName| is displayed here. In addition, if I check the poller cache, these data sources are never listed. Cacti never actually queries for the data.
5 - Data Sources.JPG (14.65 KiB) Viewed 3773 times
4 - The problem is, when I actually create the graphs, the |query_ItmPoolStatName| isn't displayed as expected.  What's stranger is that this works between the time that I first assign it and the first time that the poller runs.
4 - The problem is, when I actually create the graphs, the |query_ItmPoolStatName| isn't displayed as expected. What's stranger is that this works between the time that I first assign it and the first time that the poller runs.
4 - Graphs Created.JPG (7.79 KiB) Viewed 3773 times
3 - Next, I create graphs for the host.  The OIDs are listed as well as the pool names, just as expected.
3 - Next, I create graphs for the host. The OIDs are listed as well as the pool names, just as expected.
3 - Create Graph.JPG (23.09 KiB) Viewed 3773 times
2 - The data query is associated with no problem.
2 - The data query is associated with no problem.
2 - Query Added.JPG (23.45 KiB) Viewed 3773 times
1 - I start my associating the data query with the device.  I'm using the &amp;quot;Verify All Fields&amp;quot; Re-Index method to ensure that if OIDs change as we modify our pools that Cacti catches that.
1 - I start my associating the data query with the device. I'm using the &quot;Verify All Fields&quot; Re-Index method to ensure that if OIDs change as we modify our pools that Cacti catches that.
1 - Add Data Query.JPG (22.55 KiB) Viewed 3773 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Hmm, "Verify All Fields". I did not use this up to now.
But sometimes I faced strange behaviour on Data Queries. After ADDing them, I had to press the green circle once to get all INDEX data into cacti's poller_cache. Then, Graphing went fine. Without this, the tables missed some data. This behaviour, if it is really a bug, would occur EACH polling cycle for "Verify All Fields". Is it possible to change this perhaps to "Index Count Changed" (well, this change is not dynamic, sorry) and give it a try?
Of course, if this would work, more labour would be required...
Reinhard
zsnyder
Posts: 36
Joined: Thu Jan 26, 2006 1:06 pm
Location: Seattle, WA

Post by zsnyder »

Actually, I should be able to use "Index Count Changed" for this application.

I attempted what you suggested; I changed the Re-Index Method, still no go. When I apply the Data Query, it appears successful. The query returns all of the INDEX data, and all are listed when I attempt to graph. Just to verify, I clicked the green circle but that made no difference either.

Next I'll try re-creating the data query from scratch... they seem to work just once before they cause a problem.

One thing that you said led me to a question: you said that clicking the green circle causes Cacti to add the query to the poller_cache. Another interesting symptom of this has been that I've never actually seen the Data Query show up in the poller_cache. I thought this was because the Graph and the Data Source weren't being created correctly. But are you saying that even before a graph is created I should see the Data Query show up in the poller_cache?

Thanks in advance for your help.
zsnyder
Posts: 36
Joined: Thu Jan 26, 2006 1:06 pm
Location: Seattle, WA

Post by zsnyder »

No luck. Went through the whole process again. The only thing I didn't do was re-create the Data Template.

Any further suggestions? Am I the only person having this problem?

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

Post by gandalf »

zsnyder wrote:One thing that you said led me to a question: you said that clicking the green circle causes Cacti to add the query to the poller_cache. Another interesting symptom of this has been that I've never actually seen the Data Query show up in the poller_cache. I thought this was because the Graph and the Data Source weren't being created correctly. But are you saying that even before a graph is created I should see the Data Query show up in the poller_cache?
My comment may be impresice. Actually I'm on a remote system, so I'm not able to check the correct table name. Maybe it was not poller_cache but snmp_cache or the like. Let me check this later.
Reinhard
zsnyder
Posts: 36
Joined: Thu Jan 26, 2006 1:06 pm
Location: Seattle, WA

Post by zsnyder »

A little more information for you:

I went through the steps yet again, deleting and re-creating the query and the templates from end-to-end. I checked the snmp_cache and poller_cache tables while I did the work. What I found is...

1. When I associated the Data Query with the host, the snmp_cache table was updated and showed what I expected:

Code: Select all

Host: <HostDescription>, SNMP Query: f5 BIG-IP - Pool Statistics  
Index: 16.103.78.67.66.98.114.84.67.77.101.110.95.112.111.111.108, Field Name: ltmPoolStatName, Field Value: game_pool  
OID: 1.3.6.1.4.1.3375.2.2.5.2.3.1.1.16.103.78.67.66.98.114.84.67.77.101.110.95.112.111.111.108  
So the query appears to work. It caches the data and the values match what I would expect.

2. When I created a new graph, nothing changed on the poller_cache. This leads me to believe that for some reason the Data Source is not being created correctly. When I check my data sources, I see:

Code: Select all

<HostDescription> - |query_ltmPoolStatName| Connections 
Another interesting thing I notice here is that under the Custom Data section, the SNMP values are listed correctly but the "Index Type", "Index Value", and "Output Type ID" are not. They are "Data query data sources must be created through New Graphs", [BLANK], and "Data query data sources must be created through New Graphs" respectively.

Hope this helps.
zsnyder
Posts: 36
Joined: Thu Jan 26, 2006 1:06 pm
Location: Seattle, WA

Post by zsnyder »

To close to loop on this, I have figured out why this wasn't working. Sort of.

I hadn't assiciated the Data Query with any Host Templates. As soon as I do, I am able to set this up and get good data back without issue. I can even use it on a device that uses a different host template.

This workaround gets me what I need, but I'm confused as to why associating the data query with a host template is a required step. Shouldn't you be able to create a Data Source from a Data Query that doesn't exist in a Host Template?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Of coursee you should. This is an interesting find and I'll try to track this down. What kind of Data Query was this? A cacti-supplied one or a build-by-yourself?
Reinhard
zsnyder
Posts: 36
Joined: Thu Jan 26, 2006 1:06 pm
Location: Seattle, WA

Post by zsnyder »

This was a Data Query that I wrote. Indexed SNMP. I'd be happy to provide you with the templates if that would be useful.

What's most strange is that as long as it's associated with a host template--ANY host template; it works without issue.
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests