Subscriptions through agent api

So I can create events with the agent api by posting a json string to local host <<sample.file>>

event.json (439 Bytes)

reading the agent reference I can see mention of subscriptions but only as environment variables, I would like to run a script “on the agent” to modify its subscriptions, something like

if service clussvc = running, add subscription windows/cluster

is that possible on the agent or do i need to go to the backend api for that ?

Many thanks

Heyo @ohhfine . As I’m modeling your question, I think this depends entirely on your approach to entity configuration. Are the configurations managed through the agent (i.e., by setting agent-managed-entity: true in agent.yml) or is the config managed through the API? IMO the approach that might be the most useful would be to ensure that the config is agent-managed and then have some sort of config management agent do the lifting of 1. Ensuring that agent.yml has agent-managed-entity: true in it and then having the same config management agent adjust the subscription if you know that it’s enforcing that a certain service is running.

I don’t see “agent-managed-entity” in our agent.yaml file at all, the yaml is all preconfigured and deployed with salt, actually in our Linux world everything is heavily automated through salt, windows world, not so much, huge, noisy SCOM setup but working twards using sensu when not needing scom and was wondering if I could do some sort of discovery