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
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
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"
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
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'
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>
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