Problem with graphs

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

Moderators: Developers, Moderators

Post Reply
isaakO
Posts: 9
Joined: Fri Mar 26, 2010 8:21 am

Problem with graphs

Post by isaakO »

Hi,

I've created a DataQuery to obtain some values in a hardware Sensor.
When I run a snmpwalk/snmpget by hand I retrieve the correct values. The snmp query only returns 1 value, and that value it's what I want to graph.

I've also created a DataTemplete, and GraphTemplate, when I create the graphs I obtanin the corrects values in the SNMP query:

+ Running data query [17].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/poseidon.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.21796.3.3.3.1.2'
+ Located input field 'sensorIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.21796.3.3.3.1.2'
+ Found item [sensorIndex='Temperature A2'] index: 1 [from value]
+ Found item [sensorIndex='Humidity A2'] index: 2 [from value]
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/poseidon.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/poseidon.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/poseidon.xml'

When I create the graphs all the information is correct, but nothing is drawed in the graph. The device status is always Unknow, I use CMD poller and I can't upgrade. I've tried to use PING TCP AND UDP and SNMP to Down Device Detection cases.

My DataSources seems corrects:

/usr/bin/rrdtool create \
/var/lib/cacti/rra/00001sensor_sensorvalue_5955.rrd \
--step 300 \
DS:sensorValue:GAUGE:600:0:U \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:1:113760 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:1:113760 \
RRA:MAX:0.5:288:797 \

But the RRA file in never creared:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="00001SENSOR - Sensors HWGroup" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:7:/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf \
--font AXIS:8: \
--font LEGEND:7:/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/00001sensor_sensorvalue_5955.rrd":sensorValue:LAST \
AREA:a#FFC73BFF:""

ERROR: opening '/var/lib/cacti/rra/00001sensor_sensorvalue_5955.rrd': No such file or directory

All the file and directory permisssion are ok.

I've done a debug and I see this error:

php -q /usr/share/cacti/site/cmd.php 151 151
03/26/2010 03:12:44 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!

And if i change the log level to DEBUG I see this one:
03/26/2010 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: " SELECT * FROM host WHERE (disabled = '' AND id >= 151 AND id <= 151) ORDER by id"
03/26/2010 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT * FROM poller_item WHERE (host_id >= 151 AND host_id <= 151 AND rrd_next_step <= 0) ORDER by host_id"
03/26/2010 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT count(*) FROM poller_item WHERE (action=2 AND host_id >= 151 AND host_id <= 151 AND rrd_next_step <= 0)"
03/26/2010 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_next_step - 300 WHERE (host_id >= 151 AND host_id <= 151)"
03/26/2010 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_step - 300 WHERE (rrd_next_step < 0 AND host_id >= 151 AND host_id <= 151)"
03/26/2010 03:12:44 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
03/26/2010 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())"

Doing a TCPDUMP I never see the SNMP query to my device.

I'm really desperate I don't know how to fix this error.
Can you help me? Please let me know if you need more information.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Problem with graphs

Post by gandalf »

isaakO wrote: php -q /usr/share/cacti/site/cmd.php 151 151
03/26/2010 03:12:44 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
This is the root cause. You did associate a graph template to your data query and created the related graphs from your host, then?
you may see the poller cache from "System Utilities" to verify
R.
isaakO
Posts: 9
Joined: Fri Mar 26, 2010 8:21 am

Post by isaakO »

Hi,

In the poller cacher when I select the hosts y don't see nothing. I can't understand what's happening? I followed step by stepthe guide in the wiki.
isaakO
Posts: 9
Joined: Fri Mar 26, 2010 8:21 am

Post by isaakO »

Some help please :(
isaakO
Posts: 9
Joined: Fri Mar 26, 2010 8:21 am

Post by isaakO »

Hi,

I've followed from scratch this guide:

http://docs.cacti.net/manual:087:3a_adv ... ta_queries

and also this one:

http://docs.cacti.net/manual:087:3a_adv ... alkthrough

I'am unable to get graphs work, i get the same output:

03/29/2010 03:56:15 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: " SELECT * FROM host WHERE (disabled = '' AND id >= 160 AND id <= 160) ORDER by id"
03/29/2010 03:56:15 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT * FROM poller_item WHERE (host_id >= 160 AND host_id <= 160 AND rrd_next_step <= 0) ORDER by host_id"
03/29/2010 03:56:15 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT count(*) FROM poller_item WHERE (action=2 AND host_id >= 160 AND host_id <= 160 AND rrd_next_step <= 0)"
03/29/2010 03:56:15 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_next_step - 300 WHERE (host_id >= 160 AND host_id <= 160)"
03/29/2010 03:56:15 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_step - 300 WHERE (rrd_next_step < 0 AND host_id >= 160 AND host_id <= 160)"
03/29/2010 03:56:15 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
03/29/2010 03:56:15 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())"
isaakO
Posts: 9
Joined: Fri Mar 26, 2010 8:21 am

Post by isaakO »

Here is my xml file:

<query>
<name>Get Poseidon Sensors</name>
<description>Queries a list of sensors</description>
<oid_index>.1.3.6.1.4.1.21796.3.3.3.1.2</oid_index>
<index_order>SNMPv2-SMI::enterprises.21796.3.3.3.1.2</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>

<fields>
<sensorIndex>
<name>sensorName</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.21796.3.3.3.1.2</oid>
</sensorIndex>

<sensorCur>
<name>sensorCur</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.21796.3.3.3.1.5</oid>
</sensorCur>

<sensorvalue>
<name>sensorvalue</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.21796.3.3.3.1.6</oid>
</sensorvalue>

</fields>
</query>
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please omit <index_order> for a test. See http://docs.cacti.net/manual:088:3a_adv ... ta_queries for more help. Provide output of a "Verbose Query", please
R.
isaakO
Posts: 9
Joined: Fri Mar 26, 2010 8:21 am

Post by isaakO »

Problem solved, I can't access the OID index in my device (WTF), thanks for the help and g00d jos for the tool I've modified my data query and it works, I've submitted my templates in the forum. And I've learned a lot of Cacti, SNMP etc...


<interface>
<name>HWGroup</name>
<description>Get HWgroup Sensors Values</description>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.4.1.21796.3.3.3.1.6</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,2})$</oid_index_parse>
<index_title_format>|chosen_order_field|</index_title_format>
<index_order>Index</index_order>


<fields>
<Index>
<name>Index</name>
<source>index</source>
<direction>input</direction>
</Index>


<sensorName>
<name>sensorName</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.21796.3.3.3.1.2</oid>
</sensorName>

<sensorCurrent>
<name>sensorCurrent</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.21796.3.3.3.1.5</oid>
</sensorCurrent>

<sensorValue>
<name>sensorValue</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.21796.3.3.3.1.6</oid>
</sensorValue>

</fields>
</interface>
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests