Вольный перевод Postmortem Template от Hosted Graphite.
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
ansible==2.9.9 | |
ansible-lint==4.2.0 | |
appdirs==1.4.4 | |
asn1crypto==1.3.0 | |
bcrypt==3.1.7 | |
beautifulsoup4==4.9.1 | |
certifi==2020.4.5.1 | |
cffi==1.14.0 | |
chardet==3.0.4 | |
colorama==0.4.3 |
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
## | |
## Send message to Slack | |
## https://github.com/massimo-filippi/mikrotik | |
## | |
## script by Maxim Krusina, maxim@mfcc.cz | |
## based on: http://jeremyhall.com.au/mikrotik-routeros-slack-messaging-hack/ | |
## created: 2017-08-21 | |
## updated: 2018-09-22 | |
## | |
## usage: |
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
## | |
## Send a message to Slack on DHCP Bound | |
## https://github.com/massimo-filippi/mikrotik | |
## | |
## script by Maxim Krusina, maxim@mfcc.cz | |
## based on: http://jeremyhall.com.au/mikrotik-routeros-slack-messaging-hack/ | |
## created: 2018-09-23 | |
## updated: 2018-09-23 | |
## | |
## usage: |
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
#!/bin/bash | |
TEMP_STATUS="/tmp/cloudflared.status" | |
TEMP_ERR="/tmp/cloudflared.err" | |
TEMP_LOCK="/tmp/checkCloudflared.lock" | |
lockfile -r 0 $TEMP_LOCK || exit 1 | |
sudo systemctl status cloudflared > $TEMP_STATUS | |
cat $TEMP_STATUS | grep "failed to connect to an HTTPS backend" > $TEMP_ERR | |
cat $TEMP_STATUS | grep "failed to perform an HTTPS request" >> $TEMP_ERR |
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
## Monitor Pi-Hole service | |
check process pihole-FTL with pidfile /var/run/pihole-FTL.pid | |
start program = "/etc/init.d/pihole-FTL start" | |
stop program = "/etc/init.d/pihole-FTL stop" | |
if changed pid then exec "/bin/bash -c '/usr/local/bin/slack-webhook.rb'" | |
if 1 restart within 1 cycle then exec "/bin/bash -c '/usr/local/bin/slack-webhook.rb'" | |
if failed port 53 type tcp with timeout 5 seconds for 2 cycles then restart | |
## Check Pi-Hole web interface | |
check process lighttpd with pidfile /var/run/lighttpd.pid |
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
#!/usr/bin/ruby | |
require 'net/https' | |
require 'json' | |
uri = URI.parse("https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYYY/ZZZZZZZZZZZZZZZZZZZZZZZZ") | |
http = Net::HTTP.new(uri.host, uri.port) | |
http.use_ssl = true | |
request = Net::HTTP::Post.new(uri.request_uri, {'Content-Type' => 'application/json'}) | |
request.body = { |
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
Some Jenkinsfile examples |
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
FROM debian:stretch | |
CMD ["apt-get update && apt-get install -y puppet nano"] | |
CMD tail -f /dev/null |
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
version: '2.1' | |
networks: | |
monitor-net: | |
driver: bridge | |
volumes: | |
prometheus_data: {} | |
grafana_data: {} |