License
MIT License
master · public · Published over 5 years ago
{
"victorops": {
"api_url": "YOUR_API_URL_WHITOUT_ROUTING_KEY",
"routing_key": "everyone"
},
"handlers": {
"victorops": {
"type": "pipe",
"command": "handler-victorops.rb"
}
}
}
If you have multiple VictorOps accounts and need to route alerts to different endpoints, specifying the handler name in the config is necessary otherwise, the handler will attempt to route to the default victorops
. You will therefore need to use the -name
switch to specify the API endpoint as noted below.
"victorops_enpoint1": {
"type": "pipe",
"command": "/opt/sensu/embedded/bin/handler-victorops.rb -name victorops_endpoint1"
},
This plugin is also Sensu Go enabled. You can map events into ruby by using the flag --map_go_event_into_ruby
as part of your command. Practically, this might look like:
---
type: Handler
spec:
metadata:
name: victorops
namespace: default
labels:
annotations:
type: pipe
command: handler-victorops.rb --map_go_event_into_ruby
timeout: 0
handlers: []
filters:
- is_incident
env_vars:
- KEEPALIVE_SLACK_WEBHOOK=https://alert.victorops.com/integrations/generic/01234567/alert/0123456789101112
- VICTOROPS_ROUTING_KEY=testing
runtime_assets:
- sensu-plugins-victorops
- sensu-ruby-runtime
You'll also note that the plugin also supports environment variables. You can use these without having to have a file locally to load in those values.
Please describe the reason for reporting this asset. Our moderators will be notified and will disable the asset if it is found to be inappropriate.
×