Can I get a bit more context on what you are trying to accomplish? Is this in the context of writing a handler? What is the reason you do not want to send anything in the case of an
unknown? You probably want to send something so that the server logs the error. If you are wanting to prevent a particular handler from being executed when the check/metric result was an
unknown you can accomplish this on a per handler basis via config as described below.
In your handler configuration you can specify an array of severities for your handler to action on. You can use
ok events are always sent to it and the handler decides what to do with it as on an
ok in the case of pagerduty would automatically resolve the incident. By removing
unknown from your handler config you can avoid being alerted for an
unknown severity. Alternatively you could write a
filter that prevents the handler from being called as well.