local alerts

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

local alerts

MACKENZIE, GORDIE

Hi,

I am configuring alerts for monitoring logfiles. I am currently looking for multiple content in a particular logfile. I would like to be notified at one email address for the occurrence of one string and at the global alert configuration. Below, I’d like “ERROR” matches to go to the global email. I’d like Exception to go to local alert. Currently, I’m getting both alerts to the local alert only. I can’t add a second “check file” configuration for that logfile (monit errors on that). Is there a way to do this?

 

 

#global

set alert [hidden email]

 

 

check file mylog.log with path /mylog.log

     if content =  "ERROR" then alert 

     if content =  "Exception" then alert

    alert [hidden email]  #local alert

 

 

 

Gordie MacKenzie   |  Integration Specialist  |  Nova Scotia Power
T: 902-428-6924
 |  F: 902-428-6114
E: [hidden email]
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 [hidden email] 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.

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: local alerts

martinp@tildeslash.com
Hi,

the combination of global and local alert should work, provided it's not the same email address.

You can also add second "check file" for the same file, but the service name must be unique (it doesn't have to match the filename), for example:

--8<--
check file mylog_error with path /mylog.log
    ...

check file mylog_exception with path /mylog.log
    ...
--8<--

Best regards,
Martin


> On 28 Mar 2018, at 16:07, MacKenzie, Gordie <[hidden email]> wrote:
>
> Hi,
> I am configuring alerts for monitoring logfiles. I am currently looking for multiple content in a particular logfile. I would like to be notified at one email address for the occurrence of one string and at the global alert configuration. Below, I’d like “ERROR” matches to go to the global email. I’d like Exception to go to local alert. Currently, I’m getting both alerts to the local alert only. I can’t add a second “check file” configuration for that logfile (monit errors on that). Is there a way to do this?
>  
>  
> #global
> set alert [hidden email]
>  
>  
> check file mylog.log with path /mylog.log
>      if content =  "ERROR" then alert  
>      if content =  "Exception" then alert
>     alert [hidden email]  #local alert
>  
>  
>  
> Gordie MacKenzie   |  Integration Specialist  |  Nova Scotia Power
> T: 902-428-6924 |  F: 902-428-6114
> E: [hidden email]
> www.nspower.ca  
>
> Follow us on Twitter
> <image001.png>
>  
>  
>  
> Canada Anti-Spam Law Notice – To stop receiving commercial electronic messages from us, please forward this email to [hidden email] 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.
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general