Search code examples
monitoringsensuuchiwa

Ignore Checks Based on Dependencies on Uchiwa using Sensu


I'm currently using sensu and Uchiwa in an attempt to get rid of Zabbix, the problem is some checks persist even though they're dependent on other check. For example: I have a check that checks if the vpn process is active:

    "vpn-process": {
  "command": "check-process.rb -f /var/run/openvpn/client.pid",
  "subscribers": [
    "uni"
  ],
  "interval": 60,
  "dependencies": [
    "http-url1",
    "http-url2",
    "http-url3"
  ]
},

And I also have a check for http response, but this shouldn't work if the vpn is down.

    "http-url1": {
  "command": "python /etc/sensu/plugins/check-http.py https://url",
  "subscribers": [
    "uni" 
  ],
  "interval": 60
}, 

Still, Uchiwa warns about the VPN check and the HTTP checks. Uchiwa showing VPN and HTTP checks

I read about the dependency check filters, but as far as I could understand, it only works for handlers and Uchiwa is not a handler?


Solution

  • It seems you can't use Uchiwa as a handler (I checked with the maintainers), I had to write my own in python to call the API everytime the VPN is down and silence the checks I don't want to be shown in the dashboard. This way I created my own dependency.