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
{{ define "__yucca_text_alert_list" }}{{ range . }} | |
--- | |
๐ชช <b>{{ .Labels.alertname }}</b> | |
{{- if .Annotations.summary }} | |
๐ {{ .Annotations.summary }}{{ end }} | |
{{- if .Annotations.description }} | |
๐ {{ .Annotations.description }}{{ end }} | |
๐ท Labels: | |
{{ range .Labels.SortedPairs }} <i>{{ .Name }}</i>: <code>{{ .Value }}</code> | |
{{ end }}{{ end }} |
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
{{ define "TelegramAlert" }} | |
{{ if eq .Status "firing" }}๐ฅ<b>[FIRING {{end}}{{ if eq .Status "resolved" }}โ <b>[RESOLVED {{end}}ALERT]</b> | |
{{ range .Alerts -}} | |
๐ <b>Title:</b> <i>{{ .Annotations.title }}</i> | |
{{ if .Labels.severity }} ๐ <b>Status:</b> `{{ .Labels.severity }}`{{ end }} | |
๐ท๏ธ <b>Labels:</b> | |
{{ range .Labels.SortedPairs }} ๐ <i><b>{{ .Name }}:</b> {{ .Value }}</i> | |
{{end}} | |
๐ <b>Description:</b> {{ .Annotations.description }} | |
{{ if gt (len .GeneratorURL) 0 }}๐ฅ <b>Source:</b> {{ .GeneratorURL }}{{ end }} |
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
from flask import Flask, request, jsonify | |
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from email.mime.image import MIMEImage | |
from email.mime.application import MIMEApplication | |
app = Flask(__name__) | |
def send_test_mail(body): |
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
# Add in ~/.bashrc or ~/.bash_profile | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
RED="\[\033[01;31m\]" | |
YELLOW="\[\033[01;33m\]" | |
GREEN="\[\033[01;32m\]" | |
BLUE="\[\033[01;34m\]" | |
NO_COLOR="\[\033[00m\]" |