Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
themeRDark
title~/lib/nagios/plugins
OMD[mysite]:~/lib/nagios/plugins$ ./check_mail --pwstore=6@11@strato '--protocol=IMAP' '--server=imap.provider.de' '--ssl' '--port=993' '--username=user@provider.com' '--password=*************' '--forward-ec' '--forward-method=spool:' '--match-subject=Checkmk EC' '--forward-facility=2' '--forward-host=localhost' '--cleanup=delete'
OK - Forwarded 0 messages to event console | messages=0

.

For a detailed log you can use --debug at the end of the command:

Code Block
languagebash
themeRDark
OMD[mysite]:~$ ~/lib/nagios/plugins/check_mail --pwstore=6@11@strato '--protocol=IMAP' '--server=imap.provider.de' '--ssl' '--port=993' '--username=user@provider.com' '--password=*************' '--forward-ec' '--forward-method=spool:' '--match-subject=Checkmk EC' '--forward-facility=2' '--forward-host=localhost' '--cleanup=delete' --debug

.
For more information you can use --help

Code Block
languagebash
themeRDark
OMD[mysite]:~$ ~/lib/nagios/plugins/check_mail -h

.

One alternative:

Code Block
languagebash
themeRDark
OMD[mysite]:~$ lq "GET services\nColumns:host_name description check_command_expanded\nFilter: host_name = mysite\nFilter: description = Email"
localhost;Email;check_mk_active-mail!--pwstore=6@11@cmkmail '--protocol=IMAP' '--server=imap.strato.de' '--ssl' '--port=993' '--username=user@provider.com' '--password=****************' '--forward-ec' '--forward-method=spool:' '--forward-facility=2' '--forward-host=localhost'

OMD[mysite]:~$ cd ~/lib/nagios/plugins/

OMD[mysite]:~/lib/nagios/plugins$ ./check_mail --pwstore=6@11@cmkmail '--protocol=IMAP' '--server=imap.strato.de' '--ssl' '--port=993' '--username=user@provider.com' '--password=****************' '--forward-ec' '--forward-method=spool:' '--forward-facility=2' '--forward-host=localhost' --debug

...