Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Related issue (if applicable): n/a
Added Splunk/VictorOps Support
Account Setup
It will look something like this:
routing_key
which can be done from Settings -> Route Keysentity_id
is used to ensure your message can be triggered and acknowledged. It's effectively a key. If you don't provide one then Apprise will generate one for you (the same one every time).Syntax
Valid syntax is as follows:
splunk://{routing_key}@{apikey}
splunk://{routing_key}@{apikey}/{entity_id}
victorops://{routing_key}@{apikey}
victorops://{routing_key}@{apikey}/{entity_id}
https://alert.victorops.com/integrations/generic/20131114/ alert/{apikey}/{routing_key}
https://alert.victorops.com/integrations/generic/20131114/ alert/{apikey}/{routing_key}/{entity_id}
Parameter Breakdown
routing_key
values you associated within your Splunk account⚪
map
: Use Apprise (or custom) action mappings based on the Notification Type. Hence awarning
from Apprise triggers aWARNING
on Splunk, while afailure
triggers aCRITICAL
Splunk message (triggering an incident). Finally asuccess
triggers aRECOVERY
Spunk message (clearing an incident).map
is the default action if nothing is specified.⚪
warning
: Reguardless of the Apprise notification, ALWAYS trigger a SplunkWARNING
message.⚪
critical
: Reguardless of the Apprise notification, ALWAYS trigger a SplunkCRITICAL
message.⚪
acknowledgement
: Reguardless of the Apprise notification, ALWAYS trigger a SplunkACKNOWLEDGEMENT
message.⚪
info
: Reguardless of the Apprise notification, ALWAYS trigger a SplunkINFO
message.⚪
recovery
: Reguardless of the Apprise notification, ALWAYS trigger a SplunkRECOVERY
message.Custom Splunk/On-Call Event Mapping
You can have Apprise take a unique Splunk/On-Call action depending on the notification that is triggered if you use the (default)
action
ofmap
with this integration.First consider that Splunk supports the following settings:
CRITICAL
: Triggers an incidentWARNING
: May trigger an incident, depending on your settingsACKNOWLEDGEMENT
: Acks an incidentINFO
: Creates a timeline event but does not trigger an incidentRECOVERY
: Resolves an incidentBy default if the
action
is set tomap
, then Apprise maps itself to the following:info
👉 SplunkINFO
warning
👉 SplunkWARNING
failure
👉 SplunkCRITICAL
success
👉 SplunkRECOVERY
If you wish to map these differently, you simply need to use the
:
(colon) when over-riding an apprise variable. Hence, if you wanted to map the (Apprise)info
to (Splunk)ACKNOWLEDGEMENT
instead, your URL would have?:info=acknowledgement
. You can also short-form it like?i=a
if you wanted to as well (same effect).You can add as many re-mappings as you want. Just be certain to add a colon (
:
) infront of the Apprise notificaiton type first.New Service Completion Status
%global common_description
Checklist
flake8
)Testing
Anyone can help test this source code as follows:
Send a Spunk On-Call alert to fail our database service:
We can recover from the failure above by just doing the following:
Send a Spunk message while re-mapping our keys around:
Reguardless of what message type we sent, we always set it as RECOVERY: