-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reloadOnChange for targets. Separate targets config.
- Loading branch information
Mihal
committed
Dec 21, 2020
1 parent
ff9d8a3
commit 73d7ebd
Showing
8 changed files
with
126 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace AlertProxy.Classes | ||
{ | ||
public class Target | ||
{ | ||
public string UrlTemplate { get; set; } | ||
public string Bodytemplate { get; set; } | ||
public Dictionary<string,string> headers { get; set; } | ||
public string firingEmoji { get; set; } | ||
public string resolvingEmoji { get; set; } | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
|
||
"targets": { | ||
"kafka-ms": { | ||
"UrlTemplate": "http://awx.bk/api/v2/job_templates/108/launch/", | ||
"Bodytemplate": "{\"ask_inventory_on_launch\": false,\"can_start_without_user_input\": true,\"defaults\": {\"extra_vars\": \"\",\"inventory\": {\"id\": 3,\"name\": \"FirstInventory\"}},\"survey_enabled\": false,\"variables_needed_to_start\": [],\"node_templates_missing\": [],\"node_prompts_rejected\": [],\"job_template_data\": {\"id\": 108,\"description\": \"KAFKA-SERVICES-CHECK-RUN\",\"name\": \"KAFKA-SERVICES-CHECK-RUN\"}}", | ||
"headers": { | ||
"Accept-Encoding": "gzip,deflate", | ||
"authorization": "Basic Zbdj7ejjlldjqd" | ||
} | ||
}, | ||
"tlg-itretail": { | ||
"UrlTemplate": "https://api.telegram.org/botBOT-ID/sendMessage", | ||
"Bodytemplate": "{\"chat_id\": \"CHAT-ID\", \"text\": \"{{emoji}}<b>ALERT {{status}}</b>\n<code>Instance : {{labels.instance}}\nalert name : {{labels.alertname}}\njob : {{labels.job}}</code>\", \"disable_notification\": false,\"parse_mode\":\"HTML\"}", | ||
"headers": { | ||
"Accept-Encoding": "gzip,deflate" | ||
}, | ||
"firingEmoji": "\\uD83E\\uDD14", | ||
"resolvingEmoji": "\uD83D\uDE42" | ||
}, | ||
"tlg-test": { | ||
"UrlTemplate": "https://api.telegram.org/botBOT-ID/sendMessage", | ||
"Bodytemplate": "{\"chat_id\": \"CHAT-ID\", \"text\": \"{{emoji}}<b>ALERT {{status}}</b>\n<code>Instance : {{labels.instance}}\nalert name : {{labels.alertname}}\njob : {{labels.job}}</code>\", \"disable_notification\": false,\"parse_mode\":\"HTML\"}", | ||
"headers": { | ||
"Accept-Encoding": "gzip,deflate" | ||
}, | ||
"firingEmoji": "\\uD83E\\uDD14", | ||
"resolvingEmoji": "\uD83D\uDE42" | ||
} | ||
|
||
} | ||
} |