SNMP Data Query not creating rrd file.

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
wfahren
Posts: 2
Joined: Tue Feb 24, 2009 11:09 am

SNMP Data Query not creating rrd file.

Post by wfahren »

Trying to monitor my Linux TC traffic ques. I used the SNMP Data Query XML from this posting Linux TC QoS Queue Discipline Stats template and the snmp_persist.pl to for net-snmp pass_persist. I'm able to snmpwalk the OID. But can't seam to get Cacti to graph it.

Cacti - Version 0.8.7d
NET-SNMP version: 5.4.2.1
RRDtool 1.2.29

I'm new to Cacti so I'm sure it's user error. I've searched the forums and went step-by-step through the Home » Cacti 0.8.6 HowTo » Advanced Magic » Data Queries for indexed values without any luck.



1- created the Data Query (Linux - QoS Qdisc)
XML path = <path_cacti>/resources/snmp_queries/linux_qos.xml (see listing below)
Data input method = Get snmp data (indexed)


2 -created the Data Template (Linux Qos -Traffic)
Data Input Method = Get SNMP Data (indexed)
Internal Data Source Name = qdiscOutOctets
Min and max Value = 0
Data source = counter
Index type,value and ID = checked

3-created Graph Templete
Name "Linux QoS - Traffic (bits/sec)"

made sure data source was = linux QoS - Traffic (qdiscOutOctets)

Code: Select all

Item            Data Source   	 Graph Item Type         CF Type 	 Item
Item # 1 	(qdiscOutOctets):       Outbound             LINE1 	 AVERAGE 
Item # 2 	(qdiscOutOctets):       Current:              GPRINT 	 LAST
Item # 3 	(qdiscOutOctets):       Average:             GPRINT   AVERAGE
Item # 4 	(qdiscOutOctets):       Maximum:            GPRINT   MAX
4 - Add Graph Template to the Data Query
Data Query "Linux - QoS Qdisc" now as Associaed Graph Templete "Linux QoS - Traffic (bits/sec)"

5- Apply the Data Query to your Device.

6 - create New Graph (here where the problem is)
My Data Query [Linux - QoS Qdisc] is there I check on on the qdisc (index item) and hit create. No errors but the the the the item I selected never changes to gray.

Go to the Graph Management and the graph is there. Select it and turn on debug and this is what returns. There is an error opening the rrd file.

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - QoS Traffic - imq0 - htb 1" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/localhost/htdocs/cacti-0.8.7d/rra/localhost_qdiscoutoctets_20.rrd":qdiscOutOctets:AVERAGE \
LINE1:a#002A97FF:"Outbound"  \
GPRINT:a:LAST:"Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s" 

RRDTool Says:

ERROR: opening '/var/www/localhost/htdocs/cacti-0.8.7d/rra/localhost_qdiscoutoctets_20.rrd': No such file or directory
I have other graphs working and I checked the rra directory and it's not there.

turned on logging and I see this

Code: Select all

03/06/2009 05:55:03 PM - WEBLOG: Poller[0] CACTI2RRD: /usr/bin/rrdtool graph -  --imgformat=PNG  --start=-86400  --end=-300  --title="Localhost - QoS Traffic - imq0 - htb 1"  --rigid  --base=1000  --height=120  --width=500  --alt-autoscale-max  --lower-limit=0  --vertical-label="bytes per second"  --slope-mode  --font TITLE:12:  --font AXIS:8:  --font LEGEND:8:  --font UNIT:8:  DEF:a="/var/www/localhost/htdocs/cacti-0.8.7d/rra/localhost_qdiscoutoctets_20.rrd":qdiscOutOctets:AVERAGE  LINE1:a#002A97FF:"Outbound"   GPRINT:a:LAST:"Current\:%8.2lf %s"   GPRINT:a:AVERAGE:"Average\:%8.2lf %s"   GPRINT:a:MAX:"Maximum\:%8.2lf %s"
03/06/2009 05:55:03 PM - WEBLOG: Poller[0] CACTI2RRD: /usr/bin/rrdtool graph -  --imgformat=PNG  --start=-86400  --end=-300  --title="Localhost - QoS Traffic - imq0 - htb 1"  --rigid  --base=1000  --height=120  --width=500  --alt-autoscale-max  --lower-limit=0  --vertical-label="bytes per second"  --slope-mode  --font TITLE:12:  --font AXIS:8:  --font LEGEND:8:  --font UNIT:8:  DEF:a="/var/www/localhost/htdocs/cacti-0.8.7d/rra/localhost_qdiscoutoctets_20.rrd":qdiscOutOctets:AVERAGE  LINE1:a#002A97FF:"Outbound"   GPRINT:a:LAST:"Current\:%8.2lf %s"   GPRINT:a:AVERAGE:"Average\:%8.2lf %s"   GPRINT:a:MAX:"Maximum\:%8.2lf %s"
The SNMP Cache Items

Code: Select all

Host: Localhost , SNMP Query: SNMP - Interface Statistics
Index: 10 , Field Name: ifName , Field Value: imq5
OID: .1.3.6.1.2.1.31.1.1.1.1.10
Host: Localhost , SNMP Query: SNMP - Interface Statistics
Index: 11 , Field Name: ifName , Field Value: imq6
OID: .1.3.6.1.2.1.31.1.1.1.1.11
Host: Localhost , SNMP Query: SNMP - Interface Statistics
Index: 12 , Field Name: ifName , Field Value: imq7
OID: .1.3.6.1.2.1.31.1.1.1.1.12
Host: Localhost , SNMP Query: SNMP - Interface Statistics
Index: 13 , Field Name: ifName , Field Value: imq8
OID: .1.3.6.1.2.1.31.1.1.1.1.13
Host: Localhost , SNMP Query: SNMP - Interface Statistics
Index: 14 , Field Name: ifName , Field Value: imq9
OID: .1.3.6.1.2.1.31.1.1.1.1.14
.
.
.
may more listed
 
Hers is my device walk:

Code: Select all

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7d/resource/snmp_queries/linux_qos.xml'
+ XML file parsed ok.Create a Data Template
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.255.2.2.1'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.1' value: 'pfifo_fast 0'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.2' value: 'pfifo_fast 0'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.3' value: 'htb 1'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.4' value: 'sfq 12'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.5' value: 'sfq 13'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.6' value: 'sfq 14'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.7' value: 'sfq 15'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.8' value: 'sfq 19'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.9' value: 'sfq 17'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.10' value: 'sfq 18'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.11' value: 'sfq 90'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.12' value: 'htb 1'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.13' value: 'sfq 12'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.14' value: 'sfq 13'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.15' value: 'sfq 14'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.16' value: 'sfq 15'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.17' value: 'sfq 16'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.18' value: 'sfq 19'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.19' value: 'sfq 17'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.20' value: 'sfq 18'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.21' value: 'sfq 199'
+ Index found at OID: '1.3.6.1.4.1.2021.255.2.2.1.22' value: 'pfifo_fast 0'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.1' results: '1'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.2' results: '2'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.3' results: '3'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.4' results: '4'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.5' results: '5'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.6' results: '6'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.7' results: '7'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.8' results: '8'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.9' results: '9'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.10' results: '10'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.11' results: '11'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.12' results: '12'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.13' results: '13'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.14' results: '14'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.15' results: '15'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.16' results: '16'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.17' results: '17'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.18' results: '18'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.19' results: '19'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.20' results: '20'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.21' results: '21'
+ index_parse at OID: '1.3.6.1.4.1.2021.255.2.2.1.22' results: '22'
+ Located input field 'qdiscIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.255.2.2.1'
+ Located input field 'ifName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.255.2.2.0'
+ Found item [ifName='eth0'] index: 1 [from value]
+ Found item [ifName='eth1'] index: 2 [from value]
+ Found item [ifName='imq0'] index: 3 [from value]
+ Found item [ifName='imq0'] index: 4 [from value]
+ Found item [ifName='imq0'] index: 5 [from value]
+ Found item [ifName='imq0'] index: 6 [from value]
+ Found item [ifName='imq0'] index: 7 [from value]
+ Found item [ifName='imq0'] index: 8 [from value]
+ Found item [ifName='imq0'] index: 9 [from value]
+ Found item [ifName='imq0'] index: 10 [from value]
+ Found item [ifName='imq0'] index: 11 [from value]
+ Found item [ifName='imq1'] index: 12 [from value]
+ Found item [ifName='imq1'] index: 13 [from value]
+ Found item [ifName='imq1'] index: 14 [from value]
+ Found item [ifName='imq1'] index: 15 [from value]
+ Found item [ifName='imq1'] index: 16 [from value]
+ Found item [ifName='imq1'] index: 17 [from value]
+ Found item [ifName='imq1'] index: 18 [from value]
+ Found item [ifName='imq1'] index: 19 [from value]
+ Found item [ifName='imq1'] index: 20 [from value]
+ Found item [ifName='imq1'] index: 21 [from value]
+ Found item [ifName='ppp0'] index: 22 [from value]
+ Located input field 'qdiscName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.255.2.2.1'
+ Found item [qdiscName='pfifo_fast 0'] index: 1 [from value]
+ Found item [qdiscName='pfifo_fast 0'] index: 2 [from value]
+ Found item [qdiscName='htb 1'] index: 3 [from value]
+ Found item [qdiscName='sfq 12'] index: 4 [from value]
+ Found item [qdiscName='sfq 13'] index: 5 [from value]
+ Found item [qdiscName='sfq 14'] index: 6 [from value]
+ Found item [qdiscName='sfq 15'] index: 7 [from value]
+ Found item [qdiscName='sfq 19'] index: 8 [from value]
+ Found item [qdiscName='sfq 17'] index: 9 [from value]
+ Found item [qdiscName='sfq 18'] index: 10 [from value]
+ Found item [qdiscName='sfq 90'] index: 11 [from value]
+ Found item [qdiscName='htb 1'] index: 12 [from value]
+ Found item [qdiscName='sfq 12'] index: 13 [from value]
+ Found item [qdiscName='sfq 13'] index: 14 [from value]
+ Found item [qdiscName='sfq 14'] index: 15 [from value]
+ Found item [qdiscName='sfq 15'] index: 16 [from value]
+ Found item [qdiscName='sfq 16'] index: 17 [from value]
+ Found item [qdiscName='sfq 19'] index: 18 [from value]
+ Found item [qdiscName='sfq 17'] index: 19 [from value]
+ Found item [qdiscName='sfq 18'] index: 20 [from value]
+ Found item [qdiscName='sfq 199'] index: 21 [from value]
+ Found item [qdiscName='pfifo_fast 0'] index: 22 [from value]
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7d/resource/snmp_queries/linux_qos.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7d/resource/snmp_queries/linux_qos.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7d/resource/snmp_queries/linux_qos.xml'
From what i've read I thinks this is correct.

Here is the Data Query XML

Code: Select all

<interface>
        <name>Get Linux QoS Qdisc Info</name>
        <description>Queries a host for QoS Queueing Discipline Stats</description>
        <oid_index>.1.3.6.1.4.1.2021.255.2.2.1</oid_index>
        <oid_index_parse>OID/REGEXP:.*\.([0-9]{1,3})$</oid_index_parse>
        <index_order>ifName:qdiscName</index_order>
        <index_order_type>numeric</index_order_type>
        <index_title_format>|chosen_order_field|</index_title_format>

        <fields>
                <qdiscIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>index</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2021.255.2.2.1</oid>
                </qdiscIndex>
                <ifName>
                        <name>Interface Name</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2021.255.2.2.0</oid>
                </ifName>
                <qdiscName>
                        <name>Qdisc Name</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2021.255.2.2.1</oid>
                </qdiscName>
                <qdiscOutOctets>
                        <name>Bytes Out</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2021.255.2.2.2</oid>
                </qdiscOutOctets>
                <qdiscOutPkts>
                        <name>Packets Out</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2021.255.2.2.3</oid>
                </qdiscOutPkts>
                <qdiscDrops>
                        <name>Drops</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2021.255.2.2.4</oid>
                </qdiscDrops>
                <qdiscOlimit>
                        <name>Over Limits</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2021.255.2.2.5</oid>
                </qdiscOlimit>
                <qdiscRequeues>
                        <name>Requeues</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2021.255.2.2.6</oid>
                </qdiscRequeues>
        </fields>
</interface>
Here is the create graph of the query: (can't add attachments, guess from being noob :)

Code: Select all

Data Query [Linux - QoS Qdisc]  
Index 	Interface Name 	       Qdisc Name 	
1	        eth0	                        pfifo_fast 0	
2	        eth1	                        pfifo_fast 0	
3	        imq0	                        htb 1	
4	        imq0	                        sfq 12	
5	        imq0	                        sfq 13	
6	        imq0	                        sfq 14	
7	        imq0	                        sfq 15	
8	        imq0	                        sfq 19	
9	        imq0	                        sfq 17	
10	        imq0	                        sfq 18	
11	        imq0	                        sfq 90	
12	        imq1	                        htb 1	
13	        imq1	                        sfq 12	
14	        imq1	                        sfq 13	
15	        imq1	                        sfq 14	
16	        imq1	                        sfq 15	
17	        imq1	                        sfq 16	
18	        imq1	                        sfq 19	
19	        imq1	                        sfq 17	
20	        imq1	                        sfq 18	
21	        imq1	                        sfq 199	
22	        ppp0	                        pfifo_fast 0
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please apply the patches at www.cacti.net and then try again.

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?
wfahren
Posts: 2
Joined: Tue Feb 24, 2009 11:09 am

Post by wfahren »

I applied the patches and still have the same symptoms.

I think the problem is in Data Source
Under the Custom data the index Type,Value and ID are empty

Code: Select all

Index Type 	Data query data sources must be created through New Graphs.
Index Value "text box empty"  	
Output Type ID 	Data query data sources must be created through New Graphs.
Here is the create rrdtool for the rrd file

Code: Select all

Data Source Debug

/usr/bin/rrdtool create \
/var/www/localhost/htdocs/cacti-0.8.7d/rra/localhost_qdiscoutoctets_20.rrd \
--step 300  \
DS:qdiscOutOctets:COUNTER:600:0:1000000000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
User avatar
saaremaa
Posts: 7
Joined: Thu Nov 13, 2008 4:37 am
Location: Russia, Kaliningrad

Post by saaremaa »

i have same problem

Additional information here -> http://forums.cacti.net/viewtopic.php?p=164959#164959

Please help.
Ubuntu Server 9.04, NET-SNMP 5.4.1 , Cacti 0.8.7d+official patches , Kernel 2.6.28-11-server on i686 PHP 5.2.6-3ubuntu4.1 with Suhosin-Patch 0.9.6.2 Perl v5.10.0 built for i486-linux-gnu-thread-multi
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest