This script just pulls a two digit number between 0 and 100 (it's a percent). But cacti seems to plot a random number or just ends up plotting zero.
I think im missing something obvious but I'll be damned if I can find it. I would greatly appreciate any input or suggestions.
Here is what the rrd file says it has..
Everytime I pull it by hand though it shows the proper output.bash-3.2$ rrdtool fetch /var/www/html/cacti-0.8.7e/rra/dhcp-1_dhcppercent_9779.rrd LAST
dhcppercent
<Snip>
1274726700: nan
1274727000: 0.0000000000e+00
1274727300: 0.0000000000e+00
1274727600: 5.0883333333e+00
1274727900: 5.0883333333e+00
1274728200: 0.0000000000e+00
1274728500: 0.0000000000e+00
1274728800: 0.0000000000e+00
1274729100: 4.9700000000e+00
1274729400: 0.0000000000e+00
1274729700: nan
1274730000: nan
bash-3.2$ spine -C=/usr/etc/spine.conf -V=4 71 71
SPINE: Using spine config file [/usr/etc/spine.conf]
SPINE: Version 0.8.7e starting
ERROR: Spine Log File Could Not Be Opened/Created
05/24/2010 12:20:32 PM - SPINE: Poller[0] Host[71] SNMP Result: Host responded to SNMP
05/24/2010 12:20:32 PM - SPINE: Poller[0] Host[71] NOTE: There are '9' Polling Items for this Host
05/24/2010 12:20:46 PM - SPINE: Poller[0] Host[71] DS[9779] SCRIPT: /usr/bin/python /var/www/html/cacti-0.8.7e/scripts/cacti_dhcp_stats.py <removed>, output: 71
05/24/2010 12:20:46 PM - SPINE: Poller[0] Host[71] DS[889] SNMP: v2: <removed>, dsname: dhcpdSnmpPoolExpire, oid: .1.3.6.1.4.1.21695.1.2.2.5.1, value: 19973
05/24/2010 12:20:46 PM - SPINE: Poller[0] Host[71] DS[889] SNMP: v2: <removed>, dsname: dhcpdSnmpPoolAvaila, oid: .1.3.6.1.4.1.21695.1.2.2.6.1, value: 26401
05/24/2010 12:20:46 PM - SPINE: Poller[0] Host[71] DS[889] SNMP: v2: <removed>, dsname: dhcpdSnmpPoolActive, oid: .1.3.6.1.4.1.21695.1.2.2.4.1, value: 59600
05/24/2010 12:20:46 PM - SPINE: Poller[0] Host[71] DS[890] SNMP: v2: <removed>, dsname: dhcpdSnmpPoolSize, oid: .1.3.6.1.4.1.21695.1.2.2.3.2, value: 49143
05/24/2010 12:20:46 PM - SPINE: Poller[0] Host[71] DS[890] SNMP: v2: <removed>, dsname: dhcpdSnmpPoolActive, oid: .1.3.6.1.4.1.21695.1.2.2.4.2, value: 36765
05/24/2010 12:20:46 PM - SPINE: Poller[0] Host[71] DS[890] SNMP: v2: <removed>, dsname: dhcpdSnmpPoolAvaila, oid: .1.3.6.1.4.1.21695.1.2.2.6.2, value: 12378
05/24/2010 12:20:46 PM - SPINE: Poller[0] Host[71] DS[890] SNMP: v2: <removed>, dsname: dhcpdSnmpPoolExpire, oid: .1.3.6.1.4.1.21695.1.2.2.5.2, value: 12361
05/24/2010 12:20:46 PM - SPINE: Poller[0] Host[71] DS[889] SNMP: v2: <removed>, dsname: dhcpdSnmpPoolSize, oid: .1.3.6.1.4.1.21695.1.2.2.3.1, value: 86001
05/24/2010 12:20:46 PM - SPINE: Poller[0] Time: 14.0911 s, Threads: 100, Hosts: 2
It even appears to be plotting it within MYSQL
But here is what the graph shows..05/24/2010 11:28:51 AM - SPINE: Poller[0] DEVDBG: SQL:'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (889,'dhcpdSnmpPoolExpire','2010-05-24 11:28:33','19957'),(889,'dhcpdSnmpPoolAvaila','2010-05-24 11:28:33','26398'),(889,'dhcpdSnmpPoolActive','2010-05-24 11:28:33','59603'),(890,'dhcpdSnmpPoolSize','2010-05-24 11:28:33','49143'),(890,'dhcpdSnmpPoolActive','2010-05-24 11:28:33','36730'),(890,'dhcpdSnmpPoolAvaila','2010-05-24 11:28:33','12413'),(890,'dhcpdSnmpPoolExpire','2010-05-24 11:28:33','12396'),(8356,'dhcppercent','2010-05-24 11:28:33','71
'),(889,'dhcpdSnmpPoolSize','2010-05-24 11:28:33','86001')'05/24/2010 11:28:51 AM - SPINE: Poller[0] Host[71] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
So I see the rrd file doesn't have the proper data, and the graph is pulling from that. What is causing the wrong data to be stored in the rrd file?
Here is my data input:
My data template
The graph template