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:
I have spent a few hours trying to figure out why this is happening and look forward to any tips you all can provide
[SOLVED] Data Input Method -> some data sources are zeroed
Moderators: Developers, Moderators
-
- Posts: 9
- Joined: Mon Jul 16, 2012 1:58 pm
Re: Data Input Method Script -> some data sources are zeroed
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.
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.
| 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 |
-
- Posts: 9
- Joined: Mon Jul 16, 2012 1:58 pm
Re: Data Input Method Script -> some data sources are zeroed
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
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
Re: Data Input Method Script -> some data sources are zeroed
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 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)
| 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 |
-
- Posts: 9
- Joined: Mon Jul 16, 2012 1:58 pm
Re: Data Input Method Script -> some data sources are zeroed
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.
Fixing that, will post back with an update once I know whether that is working and resolve any other potential issues.
-
- Posts: 9
- Joined: Mon Jul 16, 2012 1:58 pm
Re: Data Input Method Script -> some data sources are zeroed
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
Thanks for the help
Who is online
Users browsing this forum: No registered users and 5 guests