sensu / sensu-email-handler

Sensu Go Email Handler Plugin
https://sensu.io
MIT License
11 stars 17 forks source link

failed to validate event entity is invalid entity name must not be empty #19

Open stlu opened 5 years ago

stlu commented 5 years ago

I'm new in Sensu, I'm trying to use sensu-email-handler with check-disk-usage (check) in a docker container but when the event schedule the sensu-email-handler I obtain this error:

Error: failed to validate event: entity is invalid: entity name must not be empty

This is my configuration:

~ # sensuctl check info check-disk-usage === check-disk-usage Name: check-disk-usage Interval: 300 Command: check-disk-usage.rb -w 65 -c 90 Cron: Timeout: 0 TTL: 0 Subscriptions: linux Handlers: email Runtime Assets: sensu-plugins-disk-checks Hooks: Publish?: true Stdin?: false Proxy Entity ID: Organization:
Environment: default Metric Format: nagios_perfdata Metric Handlers:

~ # sensuctl handler info email === email Name: email Type: pipe Timeout: 10 Filters: is_incident, not_silenced Mutator: Execute: RUN:  sensu-email-handler -f xxx@gmail.com -t yyyy@gmail.com -s smtp.gmail.com -u xxxx@gmail.com -p password -P 587 Environment Variables:

What is wrong? Thank you

jspaleta commented 3 years ago

Hey,

Can you provide an example of the json version of the event that is failing to process? sensuctl event info --format json <entity_name> <check_name>

It's a strange error for sure. Sensu events must have a entity section and the entity must be defined... It could be the entity name is not being parsed out of the json by the handler for some reason. If you can provide me the json version of the event I can hopefully reproduce and find a solution,