monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file size check not working


From: Martin Pala
Subject: Re: file size check not working
Date: Tue, 21 Apr 2015 23:16:38 +0200

Hi Len,

i cannot reproduce the problem … which Monit version it is? (monit -V)

Added the following configuration to monitrc:

        check file test with path /tmp/test
                if size > 200 B then alert

Then created test file and appended some bytes during several monit cycles 
(verbose mode output):

—8<—
'test' file exists
'test' is a regular file or socket
'test' size check succeeded [current size=10 B]
'test' file exists
'test' is a regular file or socket
'test' size check succeeded [current size=20 B]
'test' file exists
'test' is a regular file or socket
'test' size check succeeded [current size=30 B]
'test' file exists
'test' is a regular file or socket
'test' size check succeeded [current size=40 B]
'test' file exists
'test' is a regular file or socket
'test' size check succeeded [current size=90 B]
'test' file exists
'test' is a regular file or socket
'test' size check succeeded [current size=100 B]
'test' file exists
'test' is a regular file or socket
'test' size check succeeded [current size=110 B]
'test' file exists
'test' is a regular file or socket
'test' size check succeeded [current size=200 B]
'test' file exists
'test' is a regular file or socket
'test' size test failed for /tmp/test -- current size is 210 B
—8<—


Please can you run monit in verbose mode and collect the output for this file 
check?

Regards,
Martin


> On 18 Apr 2015, at 17:11, Len Conrad <address@hidden> wrote:
> 
> I write a file with the number of bytes equaling the number of msgs in the 
> postfix deferred queue
> 
> monit checks:
> 
> check file postfix_q_deferred with path /var/db/postfix/q_size_deferred
> if size > 200 B then alert
> 
> but it fails/succeeds when the file size is above/below 100 bytes.  
> 
> I wrote a log file to write the time + file size:
> 
> 06:30 91
> 06:35 95
> 06:35 95
> 06:35 95
> 06:40 99
> 06:40 99
> 06:45 99
> 06:45 99
> 06:45 99
> 06:50 101  < alerted here
> 06:50 101
> 06:55 101
> 06:55 101
> 06:55 101
> 07:00 111
> 07:00 111
> 07:05 111
> 07:05 111
> 
> I got a monit alert at 06:50, as always get a fail/succeed alert for the 100 
> B file size.
> 
> help!
> 
> Len
> 
> 
> 
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

[Prev in Thread] Current Thread [Next in Thread]