I’m currently migrating from sensu on VMs to sensu-go on k8s with some agents on VMs.
I try to group all resources yaml files (checks, assets…) and load/update/prune them via sensuctl create command.
I’m facing a problem with my http checks since resources are not load from server agent anymore.
With older sensu versions, checks where generated in /etc/sensu/conf.d/ on agent side, so I could get sites name directly according to server.
What is the best way with sensu-go to get specific data from agents and add them to resources ?
I think I need something like that with a variable :
--- type: CheckConfig api_version: core/v2 metadata: name: http-<site.name> spec: command: check-http.rb -h 127.0.0.1 -H 'Host: <site.url>' -p /ping --response-code 200 --user-agent sensu_check -k -w --require-bytes 4 -P 443 -s ...
With a array variable, a check should be created by element.
I could do it with API from agent, but I would like have all my resources in the same place if possible.
Otherwise I must find a solution to get needed data and generate all resources, then play with subscriptions.