Sensu Ping Check for All Hosts

I am curious, I am running the latest Sensu Go 5.14, and I would like to use a proxy host so that it automatically adds a ping check to each host automatically. I guess I’m trying to figure out how to deploy the configuration so that it just adds it automatically when a new entity comes online?

Hey!

I think a variation of the proxy_request example will work for what you want to do
https://docs.sensu.io/sensu-go/5.14/reference/checks/#using-a-proxy-check-to-monitor-multiple-proxy-entities

Following the example from the docs,
you want the agent that is actually running the ping command to subscribe to the “proxy”
check. and then every entity you want to ping needs to have two labels set:
proxy_type with the value of ‘website’
and
url with the value of the url you want to use with the http_check.sh script

The proxy_type label in the docs example is used as a selector, to select which entities will participate in the proxy_check. Only those entities with the value ‘website’ participate.

The url label in the docs example is used for token substitute to make sure that http_check.sh hits the correct endpoint.

Does that make sense?
For a ping check, you’d use a hostname or a ip address label instead of a url level

If you posted your check definition and an example entity definition I can probably help you figure out why its not working.