![]() Sorry I forgot to say that I'm running this on: Ubuntu 16.04 LTS andīuilt with ssl, with ipv6, with compression, with pam and with large filesĬopyright (C) 2001-2017 Tildeslash Ltd. Please if you think this has been addressed before feel free to point me to right direction. I'd a look into google several times (and also here) but I can't find the answer. (I've tried $DESCRIPTION, $HOST.etc but this seems to work only for email) There's any monit variable(like $DESCRIPTION for mail) that refer to MATCH line that trigger the rule? To send this string into my monitoring system (DataDog) I can't find any documentation that actually allows me to use the MATCH content, or groups (which I can see is being supported by the MATCH regex) info : 'testmonit' exec: /usr/bin/python On monit logs I can see: error : 'testmonit' content match This config make what I want, it actually raise the alarm I wantedīut now I need to know "What caused this alarm" so for example if this line appears on the log: ERROR failure to complete process due lock file. Montirc file: check file testmonit with path /var/log/testmonit.logĮxec "/usr/bin/python /opt/scripts/bin/dd_notify.py test-error" Using a very simple rule I'm able to catch line on log that provoke this error and run the specific script to alert until here all ok: I'm using monit to scan logs for errors and then push those alert into a monitoring system called DataDog.Īll seem to work as expected but now I've need to grab what is causing the alarm. I've asked this question around a week a go at StackOverflow but no answer just yet, probably is no possible but don't know where to look for that answer, I hope someone can help over here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |