Open autumnw opened 7 years ago
Their docs seem to indicate it is still supported? https://sensuapp.org/docs/latest/api/stashes-api.html
I can't quite figure it out though, as some older docs talk about migrating from stash-based silencing https://sensuapp.org/docs/0.26/reference/silencing.html#migrating-from-stash-based-silencing
Looks like it should be pretty straightforward to change the actions if we need to though. Don't even need to change the names.
+1 Silence action doesn't work. I'm running Sensu version 1.0.2 and stackstorm-sensu pack v0.5.0
@pietervogelaar so what changes need to be made? When I looked at this earlier, it seemed that they did still support /stashes
- is that no longer the case? Can you submit a PR to make calls to a different Sensu API, if that is what is required?
@LindsayHill I hit the same issue, looks like stashes for silence does not work, i modified the action a bit and i can see the check silenced in sensu ui
` class SilenceAction(SensuAction): def run(self, check, client, expiration, message): path = 'silence/{}'.format(client) if check: path = "{}/{}".format(path, check)
payload = {}
payload['message'] = message
if expiration:
payload['expire'] = expiration
if check:
payload['check'] = check
if client:
payload['subscription'] = client
#return self.api.create_stash(payload, path)
return self.api.post_silence_request(payload)
`
Please submit a PR with that change
Sensu API was changed, the old api "/stashes" does not work any more. Instead, should use "/silenced". It was already implemented in https://github.com/sangoma/pysensu/blob/master/pysensu/api.py