This file contains hidden or 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
import os | |
from setuptools import find_packages, setup | |
VERSION = "0.0.1.dev4" | |
ROOT_PATH = os.path.abspath(os.path.dirname(__file__)) | |
def get_requirements(env): | |
with open("requirements-{}.txt".format(env)) as fp: |
This file contains hidden or 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
import click | |
from .manage_secrets import get_value_from_parameter_store as get_ssm | |
@click.group() | |
def entrypoint(): | |
pass | |
@entrypoint.command() |
This file contains hidden or 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
import boto3 | |
def get_value_from_parameter_store(name): | |
client = boto3.client('ssm') | |
try: | |
parameter = client.get_parameter(Name=name, WithDecryption=True) | |
return parameter['Parameter']['Value'] | |
except client.exceptions.ParameterNotFound: | |
print("parameter not found") |
This file contains hidden or 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
{ | |
"name": "Source", | |
"actions": [ | |
{ | |
"name": "Source", | |
"actionTypeId": { | |
"category": "Source", | |
"owner": "ThirdParty", | |
"provider": "GitHub", | |
"version": "1" |
This file contains hidden or 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
"body": { | |
"Body": "<p><span style=\"font-size: 16px\"><strong>Demo Name: </strong></span>@{triggerBody()['PolicyName']}<br>\n<span style=\"font-size: 16px\"><strong>Description:</strong></span><strong> </strong>@{triggerBody()['Description']}<br>\n<strong><br>\n</strong><span style=\"font-size: 16px\"><strong>Resource</strong></span><strong><br>\n--------------<br>\nName: </strong>@{triggerBody()['Resource']['Name']}<br>\n<strong>Location: </strong>@{triggerBody()['Resource']['Location']}<br>\n<strong>Owner: </strong>@{triggerBody()['Resource']['Owner']}<br>\n<strong>VmSize: </strong>@{triggerBody()['Resource']['VmSize']}<br>\n<br>\n</p>", | |
"Subject": "Demo: @{triggerBody()['PolicyName']}", | |
"To": "@{triggerBody()['Resource']['Owner']}" | |
}, |
This file contains hidden or 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
<p align="center"> | |
<img width="600" height="370" src="https://files.gitter.im/tomarv2/J2GJ/Screen-Shot-2020-04-23-at-8.22.42-PM.png"> | |
</p> |
This file contains hidden or 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
receivers: | |
- name: 'default-email' | |
email_configs: | |
- send_resolved: true | |
to: demo@demo.com | |
from: demo@demo.com | |
smarthost: smtp.gmail.com:587 | |
headers: | |
From: demo@demo.com | |
Subject: '{{ template "email.default.subject" . }}' |
This file contains hidden or 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
route: | |
receiver: 'default-email' | |
group_by: ['alertname', 'cluster', 'service'] | |
group_wait: 10s | |
group_interval: 5m | |
repeat_interval: 4h | |
routes: | |
# - receiver: 'infrastructure-monitoring-email' | |
# match_re: | |
# service: ^(infrastructure*)$ |
This file contains hidden or 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
inhibit_rules: | |
- source_match: | |
severity: critical | |
target_match: | |
severity: warning | |
equal: | |
- alertname | |
- cluster | |
- service |
This file contains hidden or 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
global: | |
resolve_timeout: 1h | |
smtp_from: demo@demo.com | |
smtp_smarthost: smtp.gmail.com:587 #465(SSL) or 465(TLS) based on requirement | |
#smtp_require_tls: false | |
smtp_auth_username: demo@demo.com | |
smtp_auth_password: password | |
pagerduty_url: https://events.pagerduty.com/v2/enqueue | |
slack_api_url: https://hooks.slack.com/services/T12345/T12345/12345 |