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
# don't put duplicate lines or lines starting with space in the history. | |
# See bash(1) for more options | |
HISTCONTROL=ignoreboth | |
# append to the history file, don't overwrite it | |
shopt -s histappend | |
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
HISTSIZE=1000 |
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
import codecs, locale, sys | |
encoding = sys.stdout.encoding or locale.getpreferredencoding() | |
encoder = codecs.getwriter(encoding) | |
sys.stdout = encoder(sys.stdout,'backslashreplace') |
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
http://curl.trillworks.com/ #Convert cURL syntax to Python requests, Node request |
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/env python | |
# I use it by keeping it in /usr/local/bin as extract_tf_vars | |
# When I'm finished writing module I execute $ extract_tf_vars `pwd` | |
import os | |
import re | |
import sys | |
module_path = sys.argv[1] |
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
- alert: CronJobStatusFailed | |
expr: | | |
job_cronjob:kube_job_status_failed:sum | |
* ON(cronjob) GROUP_RIGHT() | |
kube_cronjob_labels | |
> 0 | |
for: 1m | |
annotations: | |
description: '{{ $labels.cronjob }} last run has failed {{$value }} times.' |
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
apiVersion: monitoring.coreos.com/v1 | |
kind: PrometheusRule | |
metadata: | |
labels: | |
app: kube-prometheus-stack | |
release: prometheus | |
name: job-failure-test | |
spec: | |
groups: | |
- name: CronJobAlert |