Versions Compared

Key

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

...

Execute active Check manually

...

For debugging reasons, it could be useful to run the check manually. Therefore, you need to open the service site of the E-Mail service and search for 'Service check command'. Now you can use the command for executing the check manually.

...

Image Removed

Image Removed



Image Added


Image Added


Code Block
languagebash
themeRDark
title~/lib/nagios/plugins
OMD[
nagnis_master
mysite]:~/lib/nagios/plugins$ ./check_mail --pwstore=6@11@strato '--protocol=IMAP' '--server=imap.provider.de' '--ssl' '--port=993' '--username=
mail@provider
user@provider.
de
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[
nagnis_master
mysite]:~$ ~/lib/nagios/plugins/check_mail --pwstore=6@11@strato '--protocol=IMAP' '--server=imap.provider.de' '--ssl' '--port=993' '--username=
mail@provider
user@provider.
de
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[
dashboard
mysite]:~$ lq "GET services\nColumns:host_name description check_command_expanded\nFilter: host_name = 
localhost
mysite\nFilter: description = Email"
localhost;Email;check_mk_active-mail!--pwstore=6@11@cmkmail '--protocol=IMAP' '--server=imap.strato.de' '--ssl' '--port=993' '--username=
cmk@anastasios-thomaidis
user@provider.
de
com' '--password=****************' '--forward-ec' '--forward-method=spool:' '--forward-facility=2' '--forward-host=localhost'

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

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


The Event would look like this:

...