Setting up watches

I have created separated configs for individual services and checks for two node cluster (1 window, 1 linux).
But I am unable to add a watch, which should trigger a script to handle a situation. I tried to add a watch section in the common config.json. But it didn’t get triggered for state=critical.
Can any one plz assist me to achieve this

Do you have “enable_script_checks” : true in json file?

1 Like

Try watches instead of watch. This works for me

{
  ...
  "watches": [
    {
      "type": "service",
      "service": "haproxy",
      "passingonly": true,
      "args": [
        "/usr/local/bin/test.sh"
      ]
    }
  ]
...
}
2 Likes