Quantcast
Channel: Sensu Community - Latest posts
Viewing all articles
Browse latest Browse all 160

How to configure the email alert (SMTP config) while exit 2 code (error occured) for service check

$
0
0

Hello @justinhenderson ,
Thank you for the clarification on the above issue, with all the pertinent details provided.
Yes i added the subscriptions to all the available agents

[root@test1 sensu]# sensuctl entity list
   ID     Class    OS               Subscriptions                        Last Seen            
──────── ─────── ─────── ──────────────────────────────────── ────────────────────────────────
  test1   agent   linux   system_test,webserver,entity:test1   2024-04-19 07:20:31 +0000 UTC  
  test2   agent   linux   system_test,webserver,entity:test2   2024-04-19 07:20:27 +0000 UTC  

And after successfully receiving the alert, I also added the filter in handlers

Additionally, there is one thing I would like to ask you

  1. If we are using sensu plugins to add the checks
    then in command section we are using below syntax
command: check-disk-usage --warning 80.0 --critical 90.0

and if we are using custom script (shell script here )
then we are giving below commands

command: "/opt/sensu/check_cpu_utilisation.sh 75 90"

and this
‘/opt/sensu/check_cpu_utilisation.sh’ script should be present in this path in every agent servers,

so is there any way that we can put custom script in one place and we are giving path of the scripts in that command section …
so we dont need to be put that custom scripts in every agent servers.

THank You


Viewing all articles
Browse latest Browse all 160

Trending Articles