简体   繁体   中英

sensu client subscriptions non-responding

I have setup sensu-server and client successfully and all is working except one thing . in this image 在此处输入图片说明

you can see that there are alerts for mysql and web ports.but I have given only "mysql" subscription right now in my client.json file in my client system. I have removed the "webserver" subscription from client.json (which I added initially before replacing it with "mysql" ) but still the checks associated with the "webserver" subscription are displayed. why is this? and how to display only the checks associated with the given subcription. here is my client.json

    {
      "client": {
       "name": "sensuclient2",
       "address": "127.0.0.1",
       "keepalive": {
      "thresholds": {
       "warning": 60,
       "critical": 120
  },

   "handlers": ["default", "mailer", "sns"]
},
  "subscriptions": [
      "mysql"
   ]

}
}

It's possible Uchiwa is showing older checks, prior to the change you made to your client configuration file (at least I went through that once!). Try deleting the events. If the API is not running the checks anymore, the events won't come up again.

You can either use sensu-cli to delete the events:

sensu-cli event delete sensuclient2 check_http

https://github.com/agent462/sensu-cli

Or make an API call...

curl -s -i -X DELETE http://yourhost:yourport/events/sensuclient2/check_http

https://sensuapp.org/docs/1.1/api/events-api.html#eventsclientcheck-delete

If the checks do come back you should check both server and and client side checks and client configuration.

Also, the simplest is the best, @vishal.k himself reminded me: you can always delete the events using Uchiwa's interface. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM