...
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.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
OMD[ nagnis_mastermysite]:~/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 | ||||
---|---|---|---|---|
| ||||
OMD[ nagnis_mastermysite]:~$ ~/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 | ||||
---|---|---|---|---|
| ||||
OMD[mysite]:~$ ~/lib/nagios/plugins/check_mail -h |
One alternative:
Code Block | ||||
---|---|---|---|---|
| ||||
OMD[ dashboardmysite]:~$ 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:
...