Hi there. I recently ran into this same issue with a bunch of my entities. I started the agent with 3 subscriptions and after creating a check with new subscription (named zookeeper) and adding it to the agent, the new check was not picked up since the backend never recognized the new subscription in the entity. Initially when the agent was installed, the zookeeper subscription didnot exist but after setting up the new check with a new subscription and trying to add the subscription to the agent just didnot seem to pick this up. The timeline was as follows
- Install agent with 3 subscriptions and see it on SensuUI
- Add new check called check-zookeeper with new subscription zookeeper
- Add new subscription to the agent.yml file and restart the sensu-agent with
service sensu-agent restart
- New subscription and checks not picked up by backend as per sensuctl and SensuUI
- Delete the sensu-agent process and retry again but same failure
- Stop the sensu-agent, wait for 5 minutes and then start again but same failure.
Agent verison:
[centos@zk-1 ~]$ sensu-agent version
sensu-agent version 6.2.0+ee, enterprise edition, build 62b5a984ace2698a52d590e732767a613b11d0b4, built 2020-12-16T23:33:11Z, built with go1.13.15
Agent configuration:
subscriptions:
- webserver
- all
- system
- zookeeper
backend-url:
- "ws://<BACKEND>:8081"
name: "<HOSTNAME>"
namespace: "digital-services"
log-level: "info" # available log levels: panic, fatal, error, warn, info, debug
Check info using sensuctl check list | grep zookeeper
:
[root@zk-1 centos]# sensuctl check list | grep zookeeper
check-zookeeper check-process.rb -p zookeeper 60 0 0 zookeeper opsgenie sensu-ruby-runtime,process-plugin true false
Entity info using sensuctl entity info <HOSTNAME>
:
=== <HOSTNAME>
Name: <HOSTNAME>
Entity Class: agent
Subscriptions: webserver, all, system, entity:<HOSTNAME>
Last Seen: 2021-01-09 17:31:47 +0000 UTC
Hostname: <HOSTNAME>
OS: linux
Platform: centos
Platform Family: rhel
Platform Version: 7.8.2003
Auto-Deregistration: false
Deregistration Handler:
Process information:
[root@zk-1 centos]# ps aux | grep sensu
sensu 8960 0.0 2.0 128564 40904 ? Ssl 17:12 0:00 /usr/sbin/sensu-agent start
root 10910 0.0 0.1 112828 2316 pts/0 S+ 17:34 0:00 grep --color=auto sensu
Any idea what went wrong in my approach? If it matters, the backend is running in a cluster mode with 3 instances