No graph of nmailq-bf.sh
list Soumya K. Das
Hi, I am not getting the graph of the nmailq-bf from my client, however I am able to get other graphs from the same machine such as Vmstat, netstat... I have noticed that there is no mention of nmailq in the hobbitgraph.cfg file, instead there is codes for mailq not nmailq. Secondly I tried changing nmail to mailq but still it didn't come...I tried changing "LARRDS" field of hobbitserver.cfg from nmailq to mailq..but still no graphs Any idea where I should be looking at... Regards Soumya
list Henrik Størner
▸
On Sun, Apr 24, 2005 at 10:03:24AM +0530, Soumya K. Das wrote:
I am not getting the graph of the nmailq-bf from my client, however I am able to get other graphs from the same machine such as Vmstat, netstat... I have noticed that there is no mention of nmailq in the hobbitgraph.cfg file, instead there is codes for mailq not nmailq.
Try adding "nmailq=mailq" to the long list of entries for the LARRDS setting in hobbitserver.cfg. It was accidentally left out in the first releases of Hobbit. The current default looks like this: LARRDS="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperature,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd" You'll need to restart Hobbit after this change (at least: kill the hobbitd_larrd processes). Regards, Henrik
list Soumya K. Das
Nope...still not showing... have a look at the code below...
This is the mailq section of hobbitgraph file
[mailq]
FNPATTERN mailq(.*).rrd
TITLE Mail Queue Length
YAXIZ Queue Length
DEF:mailq at RRDIDX@=@RRDFN@:mailq:AVERAGE
LINE2:mailq at RRDIDX@#@COLOR@:Queue Length @RRDPARAM@
COMMENT:\n
GPRINT:mailq at RRDIDX@:LAST: \: %5.1lf (cur)
GPRINT:mailq at RRDIDX@:MAX: \: %5.1lf (max)
GPRINT:mailq at RRDIDX@:MIN: \: %5.1lf (min)
GPRINT:mailq at RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
# This handles "mailq.rrd", "mailqin.rrd" and "mailqout.rrd"
And this is what I get in the screen when it runs the mailq command
Total requests: 3
Don't you think the @RRDFN@ should be requests instead of "requests" or
"total requests:"
Regards
Soumya
▸
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Sunday, April 24, 2005 12:05 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] No graph of nmailq-bf.sh
On Sun, Apr 24, 2005 at 10:03:24AM +0530, Soumya K. Das wrote:
I am not getting the graph of the nmailq-bf from my client, however I am able to get other graphs from the same machine such as Vmstat, netstat... I have noticed that there is no mention of nmailq in the hobbitgraph.cfg file, instead there is codes for mailq not nmailq.
Try adding "nmailq=mailq" to the long list of entries for the LARRDS setting in hobbitserver.cfg. It was accidentally left out in the first releases of Hobbit. The current default looks like this:
LARRDS="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,
dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperature,apache,bind,sendm
ail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,h
obbitd"
▸
You'll need to restart Hobbit after this change (at least: kill the
hobbitd_larrd processes).
Regards,
Henrik
list Henrik Størner
▸
On Sun, Apr 24, 2005 at 12:37:28PM +0530, Soumya K. Das wrote:
Nope...still not showing... have a look at the code below...
This is the mailq section of hobbitgraph file
[mailq]
FNPATTERN mailq(.*).rrdWhat RRD files do you have in the ~hobbit/server/data/rrd/HOSTNAME/ directory ?
▸
Don't you think the @RRDFN@ should be requests instead of "requests" or "total requests:"
Nope - at the point where hobbitgraph.cfg gets involved, it doesn't look at the original status message any more. Henrik
list Soumya K. Das
Hi I have following files.
38532 Apr 24 13:41 disk,boot.rrd
38532 Apr 24 13:41 disk.rrd
19548 Apr 24 13:41 la.rrd
19548 Apr 24 13:41 mailq.rrd
19548 Apr 24 13:41 memory.actual.rrd
19548 Apr 24 13:41 memory.real.rrd
19548 Apr 24 13:41 memory.swap.rrd
304308 Apr 24 13:41 netstat.rrd
19548 Apr 24 13:41 procs.rrd
114468 Apr 24 13:41 sendmail.0.rrd
19548 Apr 24 13:39 tcp.conn.rrd
19548 Apr 24 13:39 tcp.ssh.rrd
19548 Apr 24 13:41 users.rrd
323292 Apr 24 13:39 vmstat.rrd
▸
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Sunday, April 24, 2005 1:13 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] No graph of nmailq-bf.sh
On Sun, Apr 24, 2005 at 12:37:28PM +0530, Soumya K. Das wrote:Nope...still not showing... have a look at the code below...
This is the mailq section of hobbitgraph file
[mailq]
FNPATTERN mailq(.*).rrdWhat RRD files do you have in the ~hobbit/server/data/rrd/HOSTNAME/ directory ?
Don't you think the @RRDFN@ should be requests instead of "requests" or "total requests:"
Nope - at the point where hobbitgraph.cfg gets involved, it doesn't look at the original status message any more. Henrik
list Henrik Størner
On Sun, Apr 24, 2005 at 01:51:52PM +0530, Soumya K. Das wrote:
19548 Apr 24 13:41 mailq.rrd
OK, so you have a mailq.rrd now, and it appears to be updating like the other RRD files. So I'd expect this to begin picking up data from your nmailq-bf script now after you did the change to the LARRD setting - after a while you should have enough data to form a graph. Regards, Henrik
list Geoff Steer
I'm having a similar problem with getting the correct data showing in the graph. I do get the graph displayed but the data is incorrect. It always shows 2005 which looks like it's picking up part of the date field. I can't find a copy of the nmailq script on deadcat so not sure what format the data is supposed to be in. What does hobbit expect to see for graphing on mailq? I just a have a script that sends the output of mailq i.e. Total requests: xx Is this OK? Regards Geoff Steer
list Soumya K. Das
It been 3 hours now... the rrd time stamp file shows updated no graph yet.
▸
Regards
Soumya
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Sunday, April 24, 2005 3:40 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] No graph of nmailq-bf.sh
On Sun, Apr 24, 2005 at 01:51:52PM +0530, Soumya K. Das wrote:19548 Apr 24 13:41 mailq.rrd
OK, so you have a mailq.rrd now, and it appears to be updating like the other RRD files. So I'd expect this to begin picking up data from your nmailq-bf script now after you did the change to the LARRD setting - after a while you should have enough data to form a graph. Regards, Henrik
list Henrik Størner
▸
On Sun, Apr 24, 2005 at 03:59:25PM +0530, Soumya K. Das wrote:
It been 3 hours now... the rrd time stamp file shows updated no graph yet.
Could you mail me the mailq.rrd file ? I'd like to see what's in it. Any errors logged in /var/log/hobbit/larrd*.log ? Henrik
list Henrik Størner
▸
On Sun, Apr 24, 2005 at 08:11:12PM +1000, Geoff Steer wrote:
I'm having a similar problem with getting the correct data showing in the graph. I do get the graph displayed but the data is incorrect. It always shows 2005 which looks like it's picking up part of the date field. I can't find a copy of the nmailq script on deadcat so not sure what format the data is supposed to be in. What does hobbit expect to see for graphing on mailq? I just a have a script that sends the output of mailq i.e. Total requests: xx
The nmailq-bf.sh script is part of the LARRD 0.43c package on deadcat.
It assumes that it gets a line of the form
<some random text> 182 requests
Since I stopped using sendmail several years ago, I don't know what
the mailq output format is today.
Henrik
list Henrik Størner
▸
On Sun, Apr 24, 2005 at 08:11:12PM +1000, Geoff Steer wrote:
I'm having a similar problem with getting the correct data showing in the graph.
Could you try this patch for the "mailq" parser ? It changes the way
Hobbit looks for the queue-size number so that it looks for a line
with the word "requests", and the grabs the queue-size from any number
on that line, whether before or after the "requests" keyword.
Regards,
Henrik
-------------- next part --------------
--- hobbitd/larrd/do_mailq.c 2005/03/25 21:15:26 1.9
+++ hobbitd/larrd/do_mailq.c 2005/04/24 12:59:28
@@ -55,11 +55,21 @@
}
else {
+ char *bol, *eol;
• /* Looking for "... N requests ... " */
- p = strstr(msg, "requests");
- if (p) {
+ bol = strstr(msg, "requests");
+ if (bol) {
+ while ((bol > msg) && (*bol != '\n')) bol--;
+ eol = strchr(bol, '\n'); if (eol) *eol = '\0';
• + bol += strcspn(bol, "0123456789");
+ mailq = atoi(bol);
• +#if 0
while ((p > msg) && (isspace((int) *(p-1)) || isdigit((int) *(p-1)))) p--;
mailq = atoi(p);
+#endif
sprintf(rrdfn, "mailq.rrd");
sprintf(rrdvalues, "%d:%d", (int)tstamp, mailq);
list Soumya K. Das
Sure the file is attached.
▸
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Sunday, April 24, 2005 6:13 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] No graph of nmailq-bf.sh
On Sun, Apr 24, 2005 at 03:59:25PM +0530, Soumya K. Das wrote:It been 3 hours now... the rrd time stamp file shows updated no graph yet.
Could you mail me the mailq.rrd file ? I'd like to see what's in it. Any errors logged in /var/log/hobbit/larrd*.log ? Henrik
Attachments (1)
list Henrik Størner
On Sun, Apr 24, 2005 at 11:36:39PM +0530, Soumya K. Das wrote:
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
▸
On Sun, Apr 24, 2005 at 03:59:25PM +0530, Soumya K. Das wrote:It been 3 hours now... the rrd time stamp file shows updated no graph yet.Could you mail me the mailq.rrd file ? I'd like to see what's in it.
Sure the file is attached.
The file looks ok - there are registrations going back to about 10:30 CEST, but they are all "0" for the queue length. That isn't so surprising, if you have a low-volume mail server, or you have good outbound connections so you can handle outgoing mail quickly. What numbers were you expecting for the outbound mail queue size ? And what does the output from your "mailq" command look like ? Regards, Henrik
list Soumya K. Das
The queue varies from 10 to 2400 mails. Even if it slow i should see that in the graph. But here the graph image doesn't come only.. anything I should check from the server end?
▸
Regards
Soumya
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Monday, April 25, 2005 1:39 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] No graph of nmailq-bf.sh
On Sun, Apr 24, 2005 at 11:36:39PM +0530, Soumya K. Das wrote:From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] On Sun, Apr 24, 2005 at 03:59:25PM +0530, Soumya K. Das wrote:It been 3 hours now... the rrd time stamp file shows updated no graph yet.Could you mail me the mailq.rrd file ? I'd like to see what's in it.Sure the file is attached.
The file looks ok - there are registrations going back to about 10:30 CEST, but they are all "0" for the queue length. That isn't so surprising, if you have a low-volume mail server, or you have good outbound connections so you can handle outgoing mail quickly. What numbers were you expecting for the outbound mail queue size ? And what does the output from your "mailq" command look like ? Regards, Henrik
list Henrik Størner
I need to see the data that your nmailq-bf.sh script sends. Setup the environment for your BB client like BBHOME=/usr/local/bb/bbc1.9e-btf export BBHOME . $BBHOME/etc/bbdef.sh then run the nmailq-bf.sh script like this: BB=echo $BBHOME/ext/larrd/bf/nmailq-bf.sh and send me the output. You may need to adjust some of the filename paths if you installed your client differently. Henrik
▸
On Mon, Apr 25, 2005 at 09:43:47AM +0530, Soumya K. Das wrote:The queue varies from 10 to 2400 mails. Even if it slow i should see that in the graph. But here the graph image doesn't come only.. anything I should check from the server end? Regards Soumya -----Original Message----- From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] Sent: Monday, April 25, 2005 1:39 AM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] No graph of nmailq-bf.sh On Sun, Apr 24, 2005 at 11:36:39PM +0530, Soumya K. Das wrote:From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] >> On Sun, Apr 24, 2005 at 03:59:25PM +0530, Soumya K. Das wrote:It been 3 hours now... the rrd time stamp file shows updated no graph yet.Could you mail me the mailq.rrd file ? I'd like to see what's in it.Sure the file is attached.The file looks ok - there are registrations going back to about 10:30 CEST, but they are all "0" for the queue length. That isn't so surprising, if you have a low-volume mail server, or you have good outbound connections so you can handle outgoing mail quickly. What numbers were you expecting for the outbound mail queue size ? And what does the output from your "mailq" command look like ? Regards, Henrik
--
Henrik Storner
list Soumya K. Das
Hi
I get the following: "Trickbaby" begin the hotname
status Trickbaby.nmailq green Mon Apr 25 22:12:15 IST 2005 <nmailq>
Total requests: 329
▸
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] Sent: Monday, April 25, 2005 10:38 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] No graph of nmailq-bf.sh
I need to see the data that your nmailq-bf.sh script sends.
Setup the environment for your BB client like
BBHOME=/usr/local/bb/bbc1.9e-btf
export BBHOME
. $BBHOME/etc/bbdef.sh
then run the nmailq-bf.sh script like this:
BB=echo $BBHOME/ext/larrd/bf/nmailq-bf.sh
and send me the output.
You may need to adjust some of the filename paths if you installed
your client differently.
Henrik
On Mon, Apr 25, 2005 at 09:43:47AM +0530, Soumya K. Das wrote:The queue varies from 10 to 2400 mails. Even if it slow i should see that in the graph. But here the graph image doesn't come only..
anything
I should check from the server end? Regards Soumya -----Original Message----- From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] Sent: Monday, April 25, 2005 1:39 AM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] No graph of nmailq-bf.sh On Sun, Apr 24, 2005 at 11:36:39PM +0530, Soumya K. Das wrote:From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] >> On Sun, Apr 24, 2005 at 03:59:25PM +0530, Soumya K. Das wrote:It been 3 hours now... the rrd time stamp file shows updated no graph yet.Could you mail me the mailq.rrd file ? I'd like to see what's in it.Sure the file is attached.The file looks ok - there are registrations going back to about 10:30 CEST, but they are all "0" for the queue length. That isn't so surprising, if you have a low-volume mail server, or you have good outbound connections so you can handle outgoing mail quickly. What numbers were you expecting for the outbound mail queue size ? And what does the output from your "mailq" command look like ? Regards, Henrik
-- Henrik Storner
list Henrik Størner
▸
On Mon, Apr 25, 2005 at 10:14:11PM +0530, Soumya K. Das wrote:
I get the following: "Trickbaby" begin the hotname
status Trickbaby.nmailq green Mon Apr 25 22:12:15 IST 2005 <nmailq>
Total requests: 329
OK, the current code expects that to be
329 requests
which explains why your graph shows a flat line at 0.
The good news is that this should be fixed by the patch I sent out
yesterday, so a solution has been found - and will be included in the
coming 4.0.3 release.
Regards,
Henrik
list Geoff Steer
I've finally installed the patch (public holiday yesterday) but still get no graph. I've run the debugging as you suggested for the other user having a similar problem and I get the same output from the nmailq script as them i.e. Total requests: 99 I did notice on the empty graph that did display that the label for the graph shows 'Queue Length @RRDPARAM@'. Regards Geoff
▸
On Sun, 2005-04-24 at 23:03, Henrik Stoerner wrote:On Sun, Apr 24, 2005 at 08:11:12PM +1000, Geoff Steer wrote:I'm having a similar problem with getting the correct data showing in the graph.Could you try this patch for the "mailq" parser ? It changes the way Hobbit looks for the queue-size number so that it looks for a line with the word "requests", and the grabs the queue-size from any number on that line, whether before or after the "requests" keyword. Regards, Henrik
------------------------------- Safe Stamp --------------------------------
Your Anti-virus Service scanned this email. It is safe from known viruses.
list Geoff Steer
In setting up the sendmail graphs, I found that some fields introduced in later sendmail versions were not displayed. The attached patch to do_sendmail.c will allow the extra field introduced in sendmail 8.13.x to be graphed. It should also work with most earlier versions of sendmail back to at least 8.9.x (if you're running a version that old, it's time to upgrade!) As we only run 8.13.x in production, I haven't been able to test much the changes with prior versions of sendmail other than a quick test with 8.11.x. Regards Geoff Steer Firstwave Technology
list Henrik Størner
▸
On Tue, Apr 26, 2005 at 10:35:35AM +1000, Geoff Steer wrote:
In setting up the sendmail graphs, I found that some fields introduced in later sendmail versions were not displayed. The attached patch to do_sendmail.c will allow the extra field introduced in sendmail 8.13.x to be graphed.
This ended up causing some major changes to the way Hobbit handles RRD files, but I think it has improved. Hobbit will now auto-detect what datasets are in an existing RRD file, and use this to select what data to update the RRD-file with. So if you have an existing RRD file without the new field, it will continue to use that format (and you dont get the new field data tracked). If Hobbit creates a new RRD file it will include the new field, and track data for it. So it should work for all Sendmail versions, and remain compatible with the existing RRD's. Henrik