Hey @sensu-tester,
Welcome to the community! Looking at your configuration, I only see one major thing that is not explicitly noted, which will be essential to consider: the agent subscription.
Sensu Subscription: Each Sensu agent must be configured with the subscription that matches one specified in your check configuration (system_test
). This should be set in the agent’s configuration file or passed as a flag when starting the agent:
subscriptions:
- system_test
You may already have this set, but I don’t see it explicitly noted in the provided configuration.
You may also want to consider adding some of the Sensu built-in filtering for the email handler, like:
filters:
- is_incident
- not_silenced
The next steps are validating your (correctly) obfuscated email handler configuration and then testing. Will you let us know if you encounter any difficulties there?
One additional note: while your script seems fine, there is an asset that can accomplish the same task:
I hope that’s helpful; let us know how things go.