(https://github.com/sandino/Markdown-Cheatsheet) (перевод, оригинал)
Поиграть с разметкой Markdown можно на демо-странице.
| --- | |
| ### | |
| # Elasticsearch Rolling restart using Ansible | |
| ### | |
| ## | |
| ## Why is this needed? | |
| ## | |
| # | |
| # Even if you use a serial setting to limit the number of nodes processed at one |
| KEY=XXXXXXXXXXXX | |
| HOST="https://metrics.crisidev.org" | |
| mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search\?query\=\& |tr ']' '\n' |cut -d "," -f 5 |grep slug |cut -d\" -f 4); do | |
| curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash > dashboards/$dash.json | |
| done |
| a="[email protected], [email protected]" | |
| mutt -s "subject" -a file.pdf -- $a |
| # recursive search for keys containing "string" stripping empty results | |
| jq '.. | objects | with_entries(select(.key | contains("ftp"))) | select(. != {})' | |
| # same, but output propper array | |
| jq '[ .. | objects | with_entries(select(.key | contains("ftp"))) | select(. != {}) ]' | |
| # or | |
| jq 'map( .. | objects | with_entries(select(.key | contains("ftp"))) | select(. != {}) )' | |
| # transform input from {type: a, amount: 1} to {a: 1} and sum all values by type | |
| jq '[ .[] | {(.type): .amount} ] | map(to_entries) | add | group_by(.key) | map({key: .[0].key, value: map(.value) | add}) | from_entries' |
| modules: | |
| https_2xx: | |
| prober: http | |
| timeout: 5s | |
| http: | |
| method: GET | |
| no_follow_redirects: false | |
| fail_if_ssl: false | |
| fail_if_not_ssl: true | |
| preferred_ip_protocol: "ipv4" |
(https://github.com/sandino/Markdown-Cheatsheet) (перевод, оригинал)
Поиграть с разметкой Markdown можно на демо-странице.
This is insecure, fast-to-setup setup of simple master-slave replication with dockerized PostgreSQL installation.
Note, that below works with version postgres version 12.2: postgres (PostgreSQL) 12.2 (Debian 12.2-1.pgdg100+1).
Preparation:
# This is where your primary database files will be stored| apiVersion: operator.victoriametrics.com/v1beta1 | |
| kind: VMServiceScrape | |
| metadata: | |
| name: apiserver | |
| namespace: monitoring-system | |
| spec: | |
| endpoints: | |
| - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token | |
| bearerTokenSecret: | |
| key: "" |
Make sure you have these settings enabled in felix, in this case using enviornment variables:
FELIX_PROMETHEUSMETRICSENABLED = True
FELIX_PROMETHEUSMETRICSPORT = "9091"
FELIX_PROMETHEUSGOMETRICSENABLED = True
FELIX_PROMETHEUSPROCESSMETRICSENABLED = True