According to the documentation, silences can be applied to subscriptions or checks. If a silence is applied to an subscription, a wildcard is provided for the check, and vice versa.
From the Web UI, I can manually create a silence for a specific check and not specify the subscription. The result is that the check is applied to all subscriptions/entities.
For example, if I create a new silence for a check called check_salt_procs and leave subscription field blank, I get the following silence: *:check_salt_procs
The API seems to behave differently and Iβve been unable to successfully create the same silence.
If I try to submit my request without a subscription, the backend returns a 400.
If I include the name of the targeted subscription (which is not desirable for this use case), the entry name of the silence becomes the name of the subscription.
For example, if I define subscription in my request as "subscription": "salts", my silence becomes salts:*
Is this type of silence via the API possible? And if so, is there an example of a check silence without a subscription anywhere? The reference examples only appear to cover subscriptions.
The problem I see is that there is (still) no documentation on how to silence the checks via the api and the check attribute isnβt even listed in the api spec so Iβm not sure how I would have even know about it without browsing the code.
@todd, thank you for creating and reviewing the docs issue!
@irleg, thank you for bringing this to our attention. We added a check-only silence example to the GET and POST commands in the silencing API doc and links to check-only and subscription-only examples in the introduction of the silencing reference doc.