monit-general
[Top][All Lists]
Advanced

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

File content check for missing message


From: MACKENZIE, GORDIE
Subject: File content check for missing message
Date: Wed, 6 Dec 2017 15:34:30 +0000

Hi,

I have a process that runs every ten minutes. Monit is monitoring the logfile for errors. However, there are times when my process hangs for about 20 minutes and there is no error logging to look for. I am trying to configure monit to notify me if it has not seen “Starting now” in the logs at least once every 11 minutes (the process takes only a couple seconds to run but I would like to check after 11 minutes. For example, my process runs and logs “Starting now” at 10:05am. Monit is running every 30 seconds. I would expect my process to again log at 10:15am. Monit, by 10:16, would notice that “Starting now” has not appeared in the log files since 10:05 and it would notify my. I have tried the following:

 

check file fuse.log with path /app/jboss-fuse-6.0.0.redhat-024/data/log/fuse.log

    if content != "Start Batch Outage" for 22 cycles then alert

    alert address@hidden on {

        content } with mail-format { subject: PROD ALARM!! }

    group server

 

Should the != work here? I get a notification every 30 seconds that it “matched” the rule. Perhaps I am misunderstanding how this should work?


Thanks!

Gordie MacKenzie   |  Integration Specialist  |  Nova Scotia Power
T: 902-428-6924
 |  F: 902-428-6114
E: address@hidden
www.nspower.ca  

Follow us on Twitter

Description: Emera+EE-Signature-NSP.gif

 

 

 

Canada Anti-Spam Law Notice – To stop receiving commercial electronic messages from us, please forward this email to address@hidden with the word “unsubscribe” in the subject line. | Nova Scotia Power | 1223 Lower Water Street, Halifax NS B3J 3S8 | www.nspower.ca
Confidentiality Notice - The email communication is considered confidential
and is intended only for the recipient(s). If you received this email in error,
please contact the sender and delete the email. Unauthorized disclosure or
copying of this email is prohibited.

Attachment Limits - Emera will not accept email larger than 20MB or emails 
containing high risk attachments like ZIP, EXE or others that could contain viruses.
If you have a business need to send such an email, please contact the recipient for instructions.

reply via email to

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