...
Copy the plugin to the local path.
Code Block language bash theme RDark OMD[mysite]:~/lib/nagios/plugins$ cp check_mail ~/local/lib/nagios/plugins/
.
Add a print for the subject
Code Block language bash theme RDark for index, msg in sorted(mails.items()): subject = msg.get('Subject', 'None') print(subject)
.
Run the script manually
Code Block language bash theme RDark OMD[mysite]:~/lib/nagios/plugins$ ./check_mail --pwstore=6@17@password_1 '--fetch-protocol=IMAP' '--fetch-server=imap.strato.de' '--fetch-tls' '--fetch-port=993' '--fetch-username=user@provider.com' '--fetch-password=*************' '--connect-timeout=10' '--forward-ec' '--match-subject=.*Incident.*\n.*assigned' =?utf-8?Q?Incident_INC000000XXXX_has_bee?= =?utf-8?Q?n_assigned_to_your_group_'XXXX= =?utf-8?Q?XXXXX'_=XXXXX:_Comuni?= =?utf-8?Q?XXXXX_-_Priority:_Low?= =?utf-8?Q?Incident_INC000000XXXX_has_bee?= =?utf-8?Q?n_assigned_to_your_group_'XXXX= =?utf-8?Q?XXXXX'_=XXXXX:_Comuni?= =?utf-8?Q?XXXXX_-_Priority:_Low?= Forwarded 2 messages to event console | messages=2
.
Events: Syslog facility
Use this syslog facility for all created events.
...