[SOLVED] Data Input Method -> some data sources are zeroed

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

Moderators: Developers, Moderators

Post Reply
FliesLikeABrick
Posts: 9
Joined: Mon Jul 16, 2012 1:58 pm

[SOLVED] Data Input Method -> some data sources are zeroed

Post by FliesLikeABrick »

Hello all,

I have written a python script which in turn queries a cloud service management API to get information about a storage mechanism (nor important).

The script prints out 7 field-value pairs for cacti to parse while polling:
entityblobassoc:7314 failedworkitems:4 mydeployments:24 sqlbac:2 wad-control-container:97 workerlogs:1343 meta-all:8784

The poller seems to be calling this correctly:
07/16/2012 03:00:26 PM - CMDPHP: Poller[0] Host[5] DS[29] CMD: python /opt/opstools/cacti/azure-container-count.py meta-all, output: entityblobassoc:7314 failedworkitems:4 mydeployments:24 sqlbac:2 wad-control-container:97 workerlogs:1343 meta-all:8784

But when I look in the RRD file, a few of the data stores are receiving zero values:
meta-all entityblobassoc failedworkitems mydeployments sqlbac wadcontrolcontainer workerlogs
1342464300: 8.7519499090e+03 0.0000000000e+00 4.0000000000e+00 2.4000000000e+01 2.0000000000e+00 9.7000000000e+01 0.0000000000e+00
1342464600: 8.7840000000e+03 -nan 4.0000000000e+00 2.4000000000e+01 2.0000000000e+00 9.7000000000e+01 -nan
1342464900: 8.7840000000e+03 -nan 4.0000000000e+00 2.4000000000e+01 2.0000000000e+00 9.7000000000e+01 -nan
1342465200: 8.7840000000e+03 -nan 4.0000000000e+00 2.4000000000e+01 2.0000000000e+00 9.7000000000e+01 -nan

In particular, the 2nd column of the RRD (entityblobassoc) should be non-zero as you can see from the poller log

Here is the configuration for that field in the data template:
Image

I have spent a few hours trying to figure out why this is happening and look forward to any tips you all can provide :)
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Data Input Method Script -> some data sources are zeroed

Post by BSOD2600 »

Look in the cacti.log for the rrdtool update command against Host[5] DS[29] (whatever that file is named).

Check the data template for valid min/max values for your template. cacti does NOT upgrade the rrd file after it's been created if you modify the data template fields.
FliesLikeABrick
Posts: 9
Joined: Mon Jul 16, 2012 1:58 pm

Re: Data Input Method Script -> some data sources are zeroed

Post by FliesLikeABrick »

Interesting, here's the log entry for the script call and the rrd update:

07/16/2012 08:20:26 PM - CMDPHP: Poller[0] Host[5] DS[30] CMD: python /opt/opstools/cacti/azure-container-count.py meta-all, output: entityblobassociations:7314 failedworkitems:4 mydeployments:24 sqlbac:2 wad-control-container:97 workerlogs:1349 meta-all:8790
07/16/2012 08:20:27 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/rarecrowdsprod_blob_core_windows_net_all_30.rrd --template failedworkitems:mydeployments:sqlbac:wadcontrolcontainer:all 1342484402:4:24:2:97:8790


The template for the data is missing 2 fields, and the data for the first field is all messed up - you can see from the output of the script above that 1342484402 is not a proper value (I'm not sure where this is coming from)

min and max are set to 0 for all of these data sources
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Data Input Method Script -> some data sources are zeroed

Post by BSOD2600 »

FliesLikeABrick wrote:The template for the data is missing 2 fields, and the data for the first field is all messed up - you can see from the output of the script above that 1342484402 is not a proper value (I'm not sure where this is coming from)
1342484402 is the timestamp for the update command. As for the missing fields, is the 'update rra' setting enabled on all of those output fields in the data input method? are they all mapped in the Data Template?
FliesLikeABrick
Posts: 9
Joined: Mon Jul 16, 2012 1:58 pm

Re: Data Input Method Script -> some data sources are zeroed

Post by FliesLikeABrick »

Well crap, max was set to 100 for some of the items for some reason - and I believe that aligns with the ones that are missing. I must not have checked thoroughly enough the other day when I replied to you.

Fixing that, will post back with an update once I know whether that is working and resolve any other potential issues.
FliesLikeABrick
Posts: 9
Joined: Mon Jul 16, 2012 1:58 pm

Re: Data Input Method Script -> some data sources are zeroed

Post by FliesLikeABrick »

Everything is good now - it was indeed user (my) error, but your line of questioning was very helpful in getting me to re-check areas I had already ruled out

Thanks for the help
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests