0

Is there a way to make monit alert other than by mail:

Sometimes the mailservers are down. How would I get a message about it? My idea was to make monit pass an http request to a defined service, is this possible? (for example a gelf message to my graylog server or even a self-made service)

ProfHase85
  • 451
  • 3
  • 6
  • 13
  • Don't use the email server you're monitoring as the email server for sending alerts. – joeqwerty Feb 10 '15 at 15:37
  • You re right therefore I will use a fallback mail server. The Problem still remains: I won't get any info if the whole server is down... But i think, only mmonit can handle this – ProfHase85 Feb 10 '15 at 15:47

1 Answers1

1

There are multiple ways:

Either you could use some different mail provider (its always a good idea, if notifying does not depend on your infrastructure) for sending out email or even relay them to a sms gateway or you could use monits ability to call scripts like

if <condidtion> then exec </path/to/script> as uid <uid> and gid <guid>

Your script can do whatever magic you want to have.

Henrik
  • 668
  • 5
  • 19