[SOLVED] Unable to get from script to graph
Moderators: Developers, Moderators
[SOLVED] Unable to get from script to graph
Hello,
I have tried to create a graph from a script in the style of http://docs.cacti.net/?q=node/300
When I check cacti.log, my script gives output for its three output fields in the following format.
output: direct:10 lbhost:61 pool:200
My graph shows values for the "pool" data field, but not for the other two. When I do
rrdtool fetch /path/file.rrd, I see a lot of entries that look like this
1224097200: nan nan nan
1224097500: nan nan nan
1224097800: nan nan nan
mixed in with a few entries that look like this
1224096300: 2.7000000000e+01 nan nan
1224096600: 9.0600000000e+00 nan nan
1224096900: 9.0600000000e+00 nan nan
I'm sure I have done something wrong, but I'm not sure what it is at this point. Can you provide me with some help?
Thanks in advance,
Buz
I have tried to create a graph from a script in the style of http://docs.cacti.net/?q=node/300
When I check cacti.log, my script gives output for its three output fields in the following format.
output: direct:10 lbhost:61 pool:200
My graph shows values for the "pool" data field, but not for the other two. When I do
rrdtool fetch /path/file.rrd, I see a lot of entries that look like this
1224097200: nan nan nan
1224097500: nan nan nan
1224097800: nan nan nan
mixed in with a few entries that look like this
1224096300: 2.7000000000e+01 nan nan
1224096600: 9.0600000000e+00 nan nan
1224096900: 9.0600000000e+00 nan nan
I'm sure I have done something wrong, but I'm not sure what it is at this point. Can you provide me with some help?
Thanks in advance,
Buz
Does this do the trick?gandalf wrote:Please show us a script example from command line. Is the string "output:" prepended to the output itself? Next, I need a screenshot of the data template
Reinhard
SOW
My command line
[swalker@cacti:~]$ ./scripts/newstatic.pl http://www.mycompanyname.com/
direct:48 lbhost:6 pool:355[swalker@cacti:~]$
My log
10/15/2008 03:50:05 PM - CMDPHP: Poller[0] Host[587] DS[6471] CMD: /bin/perl /opt/cacti/cacti/scripts/newstatic.pl http://mycompany.com/img_/hm/20015_app_banner.jpg, output: direct:2 lbhost:5 pool:8
- Attachments
-
- static.JPG (176.64 KiB) Viewed 2901 times
Thanks for your help. Is this what you're looking for?gandalf wrote:This is all fine. Now, please post the line from "rrdtool update" as given by 2nd link of my sig to see, how the file update is performed
Reinhard
SOW
10/16/2008 03:59:29 PM - WEBLOG: Poller[0] CACTI2RRD: /opt/cacti/bin/rrdtool graph - --imgformat=PNG --start=-7776000 --end=-300 --title="Isolated Web Server - Static Latency" --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --vertical-label="Milliseconds" --slope-mode --font TITLE:12: --font AXIS:8: --font LEGEND:7: --font UNIT:8: DEF:a="/mnt/boombox-vol2/cacti-0.8.7b/rra/isolated_web_server_pool_6471.rrd":pool:AVERAGE DEF:b="/mnt/boombox-vol2/cacti-0.8.7b/rra/isolated_web_server_pool_6471.rrd":pool:MAX DEF:c="/mnt/boombox-vol2/cacti-0.8.7b/rra/isolated_web_server_pool_6471.rrd":lbhost:AVERAGE DEF:d="/mnt/boombox-vol2/cacti-0.8.7b/rra/isolated_web_server_pool_6471.rrd":lbhost:MAX DEF:e="/mnt/boombox-vol2/cacti-0.8.7b/rra/isolated_web_server_pool_6471.rrd":direct:AVERAGE DEF:f="/mnt/boombox-vol2/cacti-0.8.7b/rra/isolated_web_server_pool_6471.rrd":direct:MAX LINE2:a#FFF200FF:"direct" GPRINTLAST:"Current\:%8.2lf %s" GPRINTAVERAGE:"Average\:%8.2lf %s" GPRINTMAX:"Maximum\:%8.2lf %s\n" LINE2:c#FF00FFFF:"lbhost" GPRINT:c:LAST:"Current\:%8.2lf %s" GPRINT:c:AVERAGE:"Average\:%8.2lf %s" GPRINT:d:MAX:"Maximum\:%8.2lf %s\n" LINE2:e#4444FFFF:"pool" GPRINT:e:LAST:" Current\:%8.2lf %s" GPRINT:e:AVERAGE:"Average\:%8.2lf %s" GPRINT:f:MAX:"Maximum\:%8.2lf %s\n"
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
When you edit your Data Template and view each DS tab, is the correct Data Input Output Value drop down value selected for the DS name in question? Seem's odd.
Regards,
TheWitness
Regards,
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 1 guest