5 datasource items in data template -> 25 items in dropdo
Moderators: Developers, Moderators
5 datasource items in data template -> 25 items in dropdo
So I am trying to graph 5 rows I'm getting from an indexed SNMP data query I've written, all on one graph.
It seems to work fine, except for one odd thing. When I have created a graph with this, and go to "Graph Management", the dropdown for each "graph item field" in the "supplemental graph template data" area shows each of the 5 datasources repeated 5 times, yielding 25 different versions.
I see, for example, the equivalent of:
"dataSource1 (where index == 1)" x 5
"dataSource2 (where index == 2)" x 5
"dataSource3 (where index == 3)" x 5
"dataSource4 (where index == 4)" x 5
"dataSource5 (where index == 5)" x 5
Anybody know what causes this?
- Tim
It seems to work fine, except for one odd thing. When I have created a graph with this, and go to "Graph Management", the dropdown for each "graph item field" in the "supplemental graph template data" area shows each of the 5 datasources repeated 5 times, yielding 25 different versions.
I see, for example, the equivalent of:
"dataSource1 (where index == 1)" x 5
"dataSource2 (where index == 2)" x 5
"dataSource3 (where index == 3)" x 5
"dataSource4 (where index == 4)" x 5
"dataSource5 (where index == 5)" x 5
Anybody know what causes this?
- Tim
You messed something up .
Does each data source have multiple fields? Multiple devices using that snmp data query?
Possibly consider changing the data source titles to included the device's index #, name or other unique field.
Does each data source have multiple fields? Multiple devices using that snmp data query?
Possibly consider changing the data source titles to included the device's index #, name or other unique field.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
No nooooo!BSOD2600 wrote:You messed something up .
Does each data source have multiple fields? Multiple devices using that snmp data query?
Possibly consider changing the data source titles to included the device's index #, name or other unique field.
Each Data Template has 5 Data Source Items, as it should be, since I want to display each of the items on a single graph.
When I did "create graphs for this host" and chose the given Data Source, it created 5 data sources for that host, all with the same name (but different index values). Even if I go and modify each of these created Data Sources to have a different name (reflecting what index value they represent), I still get the big list of 25 data sources per host.
Also, when I initially do the "create graphs for this host", it creates 5 separate graphs; is this normal? I have to go back and delete 4 of them.
Any other suggestions on how to debug this?
- Tim
Generally not.tbessie wrote:Also, when I initially do the "create graphs for this host", it creates 5 separate graphs; is this normal? I have to go back and delete 4 of them.
Post a screenshot of the data input method, data template, graph template, a data source and graph for this device.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
In addition to this, I added the query parameter variable corresponding to the name of the given row in my SNMP query, to the datasource name.
That works, I get 5 data sources, each with a different name and index. However, when do the "create graphs for host" and select each of the indexes for this indexed query, it creates 5 graphs, 1 Data Source per index, and, as mentioned, the dropdown on
Console -> Graph Management -> Graph Item Fields contains each data source 5 times (each named with the name value tied to the SNMP row index PLUS the name assigned to the index in the Data Query page, yielding 5 x 5 = 25 options).
- Tim
That works, I get 5 data sources, each with a different name and index. However, when do the "create graphs for host" and select each of the indexes for this indexed query, it creates 5 graphs, 1 Data Source per index, and, as mentioned, the dropdown on
Console -> Graph Management -> Graph Item Fields contains each data source 5 times (each named with the name value tied to the SNMP row index PLUS the name assigned to the index in the Data Query page, yielding 5 x 5 = 25 options).
- Tim
Well, there is no data input method, just a data query.BSOD2600 wrote:Generally not.tbessie wrote:Also, when I initially do the "create graphs for this host", it creates 5 separate graphs; is this normal? I have to go back and delete 4 of them.
Post a screenshot of the data input method, data template, graph template, a data source and graph for this device.
Here are screenshots of everything you mention, plus more.
Data Query:
http://www.timbessie.com/misc/cactiImages/dataQuery.png
Data Query Associated Graph Templates:
http://www.timbessie.com/misc/cactiImag ... plates.png
Data Template:
http://www.timbessie.com/misc/cactiImag ... mplate.png
Graph Template:
http://www.timbessie.com/misc/cactiImag ... mplate.png
Create Graphs for Device:
http://www.timbessie.com/misc/cactiImag ... Device.png
Create Graphs for Device - Done:
http://www.timbessie.com/misc/cactiImag ... e-done.png
Data Sources Created by Above:
http://www.timbessie.com/misc/cactiImag ... ources.png
One of the Data Sources:
http://www.timbessie.com/misc/cactiImag ... xample.png
Graphs Created by Above:
http://www.timbessie.com/misc/cactiImag ... Graphs.png
One of the Graphs:
http://www.timbessie.com/misc/cactiImag ... xample.png
Graph Item Dropdown:
http://www.timbessie.com/misc/cactiImag ... licity.png
Text of SNMP Index Query:
Code: Select all
<interface>
<name>JVM Memory Pools</name>
<description>Get JVM Memory Pools</description>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.2</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,2})$</oid_index_parse>
<index_order>Index</index_order>
<index_order_type>numeric</index_order_type>
<fields>
<Index>
<name>Index</name>
<source>index</source>
<direction>input</direction>
</Index>
<jvmMemPoolName>
<name>Name</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.2</oid>
</jvmMemPoolName>
<jvmMemPoolUsed>
<name>Used</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11</oid>
</jvmMemPoolUsed>
</fields>
</interface>
Ah, there we go, you DO have multiple things in your data template. Why are there 5 pools? Per your snmp xml script, there should only be 1.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
There are 5 memory pools - each row in the query is a different pool. I had thought I had to create a new Data Source Item, one per query row index, in order to graph all returned rows on a single graph.BSOD2600 wrote:Ah, there we go, you DO have multiple things in your data template. Why are there 5 pools? Per your snmp xml script, there should only be 1.
If that is not the case, would I merely use a single Data Source item, and still be able to do what I want?
- Tim
Wrong. You're not thinking abstract enough. Each Data Source for a device should represent a unique entry on some device.tbessie wrote:There are 5 memory pools - each row in the query is a different pool. I had thought I had to create a new Data Source Item, one per query row index, in order to graph all returned rows on a single graph.
Yes. Same way the snmp interface query functions. Each index is its own data source and graph. Same with yours. Each pool will have its own data source and graph. Then, once each pool # is being graphed, you can create a custom graph (either manually or with aggregate plugin) which combines them all.tbessie wrote:If that is not the case, would I merely use a single Data Source item, and still be able to do what I want?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Well, I did it the way you describe. Now I no longer get 25 entries, I get just the 5. And I created a single graph with one line per datasource, plus a Legend for each.BSOD2600 wrote:Wrong. You're not thinking abstract enough. Each Data Source for a device should represent a unique entry on some device.tbessie wrote:There are 5 memory pools - each row in the query is a different pool. I had thought I had to create a new Data Source Item, one per query row index, in order to graph all returned rows on a single graph.
Yes. Same way the snmp interface query functions. Each index is its own data source and graph. Same with yours. Each pool will have its own data source and graph. Then, once each pool # is being graphed, you can create a custom graph (either manually or with aggregate plugin) which combines them all.tbessie wrote:If that is not the case, would I merely use a single Data Source item, and still be able to do what I want?
HOWEVER... *now* it is getting the same value for all 5 datasources, even though the "name" value (taken from each row in the SNMP query) is correct for each index.
For this, I ought to have just *one* data template, correct? Not a separate data template per datasource, with index given, right? Because the created datasources have the correct index, but the graph only gives me the datasource template's name to choose from for each graph item.
- Tim
Post the verbose query of this script for that device. Sounds like you're not using the correct index. you can change the cacti logging level to debug and then monitor what values are returned for your script and their rrd files updated.tbessie wrote:HOWEVER... *now* it is getting the same value for all 5 datasources, even though the "name" value (taken from each row in the SNMP query) is correct for each index.
Correct.tbessie wrote:For this, I ought to have just *one* data template, correct? Not a separate data template per datasource, with index given, right?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Here you go. Let me know if you see anything unusual. I'm taking the "Name" value and using the final integer in the OID for my index value, as given as an example on this website:BSOD2600 wrote:Post the verbose query of this script for that device. Sounds like you're not using the correct index. you can change the cacti logging level to debug and then monitor what values are returned for your script and their rrd files updated.
Correct.tbessie wrote:For this, I ought to have just *one* data template, correct? Not a separate data template per datasource, with index given, right?
Code: Select all
+ Running data query [13].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/jvmMemoryPoolsUsed.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.2'
+ Inserting index data [value='1']
+ Inserting index data [value='2']
+ Inserting index data [value='3']
+ Inserting index data [value='4']
+ Inserting index data [value='5']
+ Located input field 'jvmMemPoolName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.2'
+ Found item [jvmMemPoolName='Code Cache'] index: 1 [from value]
+ Found item [jvmMemPoolName='Par Eden Space'] index: 2 [from value]
+ Found item [jvmMemPoolName='Par Survivor Space'] index: 3 [from value]
+ Found item [jvmMemPoolName='CMS Old Gen'] index: 4 [from value]
+ Found item [jvmMemPoolName='CMS Perm Gen'] index: 5 [from value]
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/jvmMemoryPoolsUsed.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/jvmMemoryPoolsUsed.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/jvmMemoryPoolsUsed.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/jvmMemoryPoolsUsed.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/jvmMemoryPoolsUsed.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/jvmMemoryPoolsUsed.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/jvmMemoryPoolsUsed.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/jvmMemoryPoolsUsed.xml'
All looks good there. yes, you do want to use the name to track the index in case the number changes.
Back to the duplicate graph issue. Clear the poller cache. Then look in there for your script entries. The snmp indexes are correct and unique?
Back to the duplicate graph issue. Clear the poller cache. Then look in there for your script entries. The snmp indexes are correct and unique?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Just tried that... everything looks the way it's supposed to be; yet the graph shows a single value still. No joy.BSOD2600 wrote:All looks good there. yes, you do want to use the name to track the index in case the number changes.
Back to the duplicate graph issue. Clear the poller cache. Then look in there for your script entries. The snmp indexes are correct and unique?
Here's what the cache clearing page showed; I used snmpwalk/snmpget on those OIDs, and they all have different values. Image of currently graphed data below as well. Perhaps there's something braindead I've done in all this, tho' I feel I've tried everything:
Code: Select all
emdlcis01 - jvm - memPoolUsed - 1 - Code Cache SNMP Version: 2, Community: public, OID: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.1
RRD: /var/www/cacti/rra/emdlcis01_usedmem_2006.rrd
emdlcis01 - jvm - memPoolUsed - 2 - Par Eden Space SNMP Version: 2, Community: public, OID: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.2
RRD: /var/www/cacti/rra/emdlcis01_usedmem_2007.rrd
emdlcis01 - jvm - memPoolUsed - 3 - Par Survivor Sp SNMP Version: 2, Community: public, OID: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.3
RRD: /var/www/cacti/rra/emdlcis01_usedmem_2008.rrd
emdlcis01 - jvm - memPoolUsed - 4 - CMS Old Gen SNMP Version: 2, Community: public, OID: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.4
RRD: /var/www/cacti/rra/emdlcis01_usedmem_2009.rrd
emdlcis01 - jvm - memPoolUsed - 5 - CMS Perm Gen SNMP Version: 2, Community: public, OID: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.5
RRD: /var/www/cacti/rra/emdlcis01_usedmem_2010.rrd
- Attachments
-
- memPools.png (34.68 KiB) Viewed 2715 times
Further info
Here's Spine's output, followed by snmpget's output of the same OIDs. Why would spline think the values are all the same as the 1st one it gets? Does the fact that the dsname is the same for all values have anything to do with it?
SPINE OUTPUT
SNMPGET OUTPUT
- Tim
SPINE OUTPUT
Code: Select all
05/29/2009 05:37:21 PM - SPINE: Poller[0] Host[86] DS[2136] SNMP: v2: emqlcis01, dsname: usedMem, oid: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.1, value: 8121984
05/29/2009 05:37:21 PM - SPINE: Poller[0] Host[86] DS[2137] SNMP: v2: emqlcis01, dsname: usedMem, oid: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.2, value: 8121984
05/29/2009 05:37:21 PM - SPINE: Poller[0] Host[86] DS[2138] SNMP: v2: emqlcis01, dsname: usedMem, oid: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.3, value: 8121984
05/29/2009 05:37:21 PM - SPINE: Poller[0] Host[86] DS[2139] SNMP: v2: emqlcis01, dsname: usedMem, oid: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.4, value: 8121984
05/29/2009 05:37:21 PM - SPINE: Poller[0] Host[86] DS[2140] SNMP: v2: emqlcis01, dsname: usedMem, oid: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.5, value: 8121984
Code: Select all
snmpget -v 2c -m JVM-MANAGEMENT-MIB -c public emqlcis01:5161 .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.1
JVM-MANAGEMENT-MIB::jvmMemPoolUsed.1 = Counter64: 8228224 bytes
snmpget -v 2c -m JVM-MANAGEMENT-MIB -c public emqlcis01:5161 .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.2
JVM-MANAGEMENT-MIB::jvmMemPoolUsed.2 = Counter64: 9840904 bytes
snmpget -v 2c -m JVM-MANAGEMENT-MIB -c public emqlcis01:5161 .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.3
JVM-MANAGEMENT-MIB::jvmMemPoolUsed.3 = Counter64: 0 bytes
snmpget -v 2c -m JVM-MANAGEMENT-MIB -c public emqlcis01:5161 .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.4
JVM-MANAGEMENT-MIB::jvmMemPoolUsed.4 = Counter64: 111344064 bytes
snmpget -v 2c -m JVM-MANAGEMENT-MIB -c public emqlcis01:5161 .1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11.5
JVM-MANAGEMENT-MIB::jvmMemPoolUsed.5 = Counter64: 49598600 bytes
Who is online
Users browsing this forum: No registered users and 2 guests