Check_mailq usage

carole verdon verdon at cict.fr
Fri Jun 18 10:03:30 CEST 2004


But i have got the qf* files in /var/spool/mqueue1:

[nagios at gw1-mail plugins-scripts]$ ls -la /var/spool/mqueue1|more
...
-rw-------    1 root     root         1214 Jun 18 08:45 qfi5F7lLQU018592
-rw-------    1 root     root         1270 Jun 18 08:38 qfi5F7upaq026391
-rw-------    1 root     root         1520 Jun 18 08:45 qfi5F8qxkY015433
-rw-------    1 root     root         1303 Jun 18 08:25 qfi5F9lA9f017520
-rw-------    1 root     root         1077 Jun 18 08:28 qfi5FA0iYO002193
-rw-------    1 root     root          910 Jun 18 08:16 qfi5FACOZD018046
-rw-------    1 root     root         1226 Jun 18 08:28 qfi5FAq6Po018406
-rw-------    1 root     root         2513 Jun 18 08:35 qfi5FArclt020854
-rw-------    1 root     root         2513 Jun 18 08:35 qfi5FB2wV2001275
-rw-------    1 root     root         1258 Jun 18 08:19 qfi5FBiTTq018978
-rw-------    1 root     root         2223 Jun 18 08:28 qfi5FBQnq6030125
-rw-------    1 root     root         1231 Jun 18 08:40 qfi5FBvuj4002931
-rw-------    1 root     root         1272 Jun 18 08:45 qfi5FCbjn7032123
-rw-------    1 root     root          943 Jun 18 08:31 qfi5FCefJ0002705
-rw-------    1 root     root         1878 Jun 18 08:22 qfi5FCjQJS006138
-rw-------    1 root     root         1616 Jun 18 08:45 qfi5FCk5El006633
-rw-------    1 root     root         2513 Jun 18 08:45 qfi5FCQAPp023249
-rw-------    1 root     root         2513 Jun 18 08:45 qfi5FCU7k7026177
-rw-------    1 root     root         1275 Jun 18 08:38 qfi5FD7WRd022388
-rw-------    1 root     root         1196 Jun 18 08:09 qfi5FDEQ1a027435
-rw-------    1 root     root         2513 Jun 18 08:35 qfi5FDU9dP006223
-rw-------    1 root     root          911 Jun 18 08:19 qfi5FEFG4n006807
-rw-------    1 root     root         2513 Jun 18 08:35 qfi5FENTg0012842
-rw-------    1 root     root         1159 Jun 18 08:28 qfi5FFDqRr011585
-rw-------    1 root     root         1020 Jun 18 07:50 qfi5FFnFdn002657
-rw-------    1 root     root          919 Jun 18 08:03 qfi5FFNnS0017593
-rw-------    1 root     root         1233 Jun 18 08:19 qfi5FFPoRN019173
-rw-------    1 root     root          993 Jun 18 08:06 qfi5FFxFkg012137
-rw-------    1 root     root         1241 Jun 18 08:19 qfi5FGCagP023592
-rw-------    1 root     root         1213 Jun 18 08:19 qfi5FGDVOC024196
-rw-------    1 root     root         2512 Jun 18 08:19 qfi5FGjWkr014177
-rw-------    1 root     root         2513 Jun 18 08:19 qfi5FGw2UF022547
-rw-------    1 root     root         1292 Jun 18 08:19 qfi5FHDSLS032581
........


In fact, i find what it's my problem. The /usr/bin/mailq command count 
only the number of "requests" for the queue directory: /var/spool/mqueue

[nagios at gw1-mail plugins-scripts]$ ./check_mailq -w 200 -c 500 -f 
 /etc/mail/sendmail.cf -v
qpattern before open mailq= /var/spool/mqueue
after open, mailq= /usr/bin/mailq
qpattern apres if= /var/spool/mqueue
/usr/bin/mailq =                /var/spool/mqueue (618 requests)
 size = 618, msg_q = 618 warn=200 crit=500
msg_q = 618 warn=200 crit=500
CRITICAL: mailq is 618 (threshold c = 500)|unsent=618;200;500;0


So when i want run the script to the queue directory: 
/var/spool/mqueue1, it don't work.

[nagios at gw1-mail plugins-scripts]$ ./check_mailq -w 20 -c 50 -f 
 /etc/mail/sendmail.cf.delivery -v
qpattern before open mailq= /var/spool/mqueue1
after open, mailq= /usr/bin/mailq
OK: mailq is empty|unsent=0;20;50;0


To work, the mailq command must be /usr/sbin/sendmail -bp -C 
configfile_sendmail where configfile_sendmail = /etc/mail/sendmail.cf or 
/etc/mail/sendmail.cf.delivery

How can i do that?

Thanks for your help.

Carole.


Don Badrak wrote:

>Carole,
>
>On Thu, 17 Jun 2004, carole verdon wrote:
>
>  
>
>>Hi,
>>
>>I use the patch of check_mailq submitted by Don Badrak.
>>http://sourceforge.net/tracker/index.php?func=detail&aid=880904&group_id=29880&atid=397599
>>
>>I don't understand the result of this plugin.
>>
>>When i execute the following command in local mode, i obtain:
>>
>>[nagios at gw1-mail libexec]$./check_mailq -w 20 -c 50 -f /etc/mail/sendmail.cf.delivery (to take the queue directory /var/spool/mqueue1)
>>
>>OK: mailq is empty|unsent=0;20;50;0
>>    
>>
>
>These numbers mean (I didn't write that part):
>
>	0	no message in the queue
>	20	warning level
>	50 	critical level
>	0	(hardcoded to 0, not sure what it's for)
>
>  
>
>>Whereas the queue directory /var/spool/mqueue1 contains a lot of files.
>>    
>>
>
>  
>
>>[nagios at gw1-mail libexec]$ ls -la /var/spool/mqueue1|more
>>total 19208
>>drwxr-xr-x    2 root     mail       356352 Jun 17 08:36 .
>>drwxr-xr-x   17 root     root         4096 May 27 11:31 ..
>>-rw-------    1 root     root          120 Jun 14 08:43 dfi5E6hCVr020981
>>-rw-------    1 root     root         8491 Jun 14 08:45 dfi5E6jck4023564
>>-rw-------    1 root     root        18003 Jun 14 09:02 dfi5E72Glg006944
>>-rw-------    1 root     root        18003 Jun 14 09:36 dfi5E7aFHI031188
>>-rw-------    1 root     root        18009 Jun 14 09:41 dfi5E7f0Z9001998
>>-rw-------    1 root     root        18009 Jun 14 09:45 dfi5E7jOiU005300
>>-rw-------    1 root     root        18003 Jun 14 09:20 dfi5E7KPYg021585
>>-rw-------    1 root     root        18003 Jun 14 09:21 dfi5E7LAu9021927
>>-rw-------    1 root     root        18003 Jun 14 09:21 dfi5E7LuPY022338
>>-rw-------    1 root     root        18003 Jun 14 09:50 dfi5E7oAii008351
>>-rw-------    1 root     root        18108 Jun 14 09:25 dfi5E7PjTM024651
>>-rw-------    1 root     root        18003 Jun 14 09:52 dfi5E7qkX2010331
>>-rw-------    1 root     root          593 Jun 14 09:55 dfi5E7t2KY011829
>>-rw-------    1 root     root        18108 Jun 14 09:30 dfi5E7UuW0027677
>>-rw-------    1 root     root        18108 Jun 14 09:33 dfi5E7Xx8X029494
>>-rw-------    1 root     root        18003 Jun 14 09:35 dfi5E7ZTbH030643
>>-rw-------    1 root     root       208387 Jun 14 11:51 dfi5E9owJa022588
>>-rw-------    1 root     root         1683 Jun 14 14:21 dfi5ECL3bL013410
>>-rw-------    1 root     root         1904 Jun 14 14:49 dfi5ECndk5002742
>>-rw-------    1 root     root           48 Jun 15 08:41 dfi5ECq4Xn004549
>>-rw-------    1 root     root         1086 Jun 14 14:27 dfi5ECRHMn018953
>>-rw-------    1 root     root        11199 Jun 14 14:58 dfi5ECw3wi009133
>>-rw-------    1 root     root        11199 Jun 14 14:58 dfi5ECw3xC009133
>>-rw-------    1 root     root        11199 Jun 14 14:58 dfi5ECw3xU009133
>>-rw-------    1 root     root         8715 Jun 14 15:48 dfi5EDmXmS015674
>>-rw-------    1 root     root         3063 Jun 14 15:32 dfi5EDWsC4003637
>>-rw-------    1 root     root        38504 Jun 14 16:37 dfi5EEarJ1016521
>>-rw-------    1 root     root        38504 Jun 14 16:38 dfi5EEarJl016521
>> ........
>>
>>
>>Why does it find the queue directory is empty?
>>    
>>
>
>Yes, it has a lot of files, but there are no qf* files (the queue control
>file).  Without a corresponding qf* file, the df* (data file, the actual
>message) files will stay there.  Sounds like you had some problems with
>your mail system somehow, where either the qf* files didn't get created
>(sendmail hung or file system problems) or the df* files didn't get
>deleted.
>
>  
>
>>As i'm not a programmer, can someone answer to my question and help me?
>>
>>My OS is a linux v2.4.
>>    
>>
>
>Don
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040618/fd7b9b31/attachment.html>


More information about the Users mailing list