[rrd-users] Newbie question RRD TOOL

Jasper Metselaar jasper at formmailer.net
Tue Feb 18 11:29:44 MET 2003


Hi,

I am completely new to RRD Tool. I did the turorial and read the manual, but still it is not doing what I am looking for... :-(

I hope someone can help me.

I want to have some of the output of qmailctl stat in the database (the messages in the queue and messages in queue but not yet processed): 
  ns1:/home/admin# qmailctl stat
  /service/qmail-send: up (pid 26610) 4690 seconds
  /service/qmail-send/log: up (pid 343) 2092878 seconds
  /service/qmail-smtpd: up (pid 26613) 4690 seconds
  /service/qmail-smtpd/log: up (pid 340) 2092878 seconds
  messages in queue: 2
  messages in queue but not yet preprocessed: 0

I created the following database:
   rrdtool create qmail.rrd DS:queue:GAUGE:600:U:U \
   DS:notprocessed:GAUGE:600:U:U RRA:LAST:0.5:1:24 \
   RRA:LAST:0.5:6:10 RRA:AVERAGE:0.5:1:24          \
   RRA:AVERAGE:0.5:6:10 RRA:MAX:0.5:1:24           \
   RRA:MAX:0.5:6:10 RRA:MIN:0.5:1:24 RRA:MIN:0.5:6:10

To put the data in the database I created a perl script:

  #! /usr/bin/perl -w

  $dbfile = shift @ARGV; # rrdtool database file
  $dbfile || die "no rrdtool datafile given";

    while (<>) {
      /^messages in queue:\s*(\S*)/ && ($queue = $1);
      /^messages in queue but not yet preprocessed:\s*(\S*)/ &&   ($notprocessed = $1);
               }
   exec ("rrdtool", "update", "$dbfile", "N:$queue:$notprocessed\n") || die "could not exec rrdtool";


And I created the following crontab entry:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * qmailctl stat| perl /home/admin/qmailstats.pl /home/admin/qmail.rrd 2>&1 > /dev/null


But for some kind of reason no data is inserted to the database:
ns1:/home/admin# rrdtool fetch qmail.rrd LAST
                    queue  notprocessed

1045476000: nan nan
1045477800: nan nan
1045479600: nan nan
1045481400: nan nan
1045483200: nan nan
1045485000: nan nan
1045486800: nan nan
1045488600: nan nan
1045490400: nan nan
1045492200: nan nan
1045494000: nan nan
1045495800: nan nan
1045497600: nan nan
1045499400: nan nan
1045501200: nan nan
1045503000: nan nan
1045504800: nan nan
1045506600: nan nan
1045508400: nan nan
1045510200: nan nan
1045512000: nan nan
1045513800: nan nan
1045515600: nan nan
1045517400: nan nan
1045519200: nan nan
1045521000: nan nan
1045522800: nan nan
1045524600: nan nan
1045526400: nan nan
1045528200: nan nan
1045530000: nan nan
1045531800: nan nan
1045533600: nan nan
1045535400: nan nan
1045537200: nan nan
1045539000: nan nan
1045540800: nan nan
1045542600: nan nan
1045544400: nan nan
1045546200: nan nan
1045548000: nan nan
1045549800: nan nan
1045551600: nan nan
1045553400: nan nan
1045555200: nan nan
1045557000: nan nan
1045558800: nan nan
1045560600: nan nan
1045562400: nan nan
1045564200: nan nan


Can someone tell me what I am doing wrong??

Thanks in advance!

- Jasper







_______________________________________________________

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list