Getting all images referenced in pod specs:
kubectl get pods -A -o json |
jq -r '[.items[].spec | (.initContainers // empty | .[].image), .containers[].image] | unique | sort | .[]'
Getting all images cached on nodes:
################################################### | |
## | |
## Alertmanager YAML configuration for routing. | |
## | |
## Will route alerts with a code_owner label to the slack-code-owners receiver | |
## configured above, but will continue processing them to send to both a | |
## central Slack channel (slack-monitoring) and PagerDuty receivers | |
## (pd-warning and pd-critical) | |
## |
kubectl get pods --sort-by='.status.containerStatuses[0].restartCount' |
# List of kube_*_labels metrics - not all of these are useful for alerting. | |
# kube_certificatesigningrequest_labels | |
kube_certificatesigningrequest_labels * on (certificatesigningrequest) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_cronjob_labels | |
kube_cronjob_labels * on (cronjob, namespace) group_right(label_team) ( | |
...insert expression here | |
) |
git rev-list --all | GIT_PAGER=cat xargs git grep 'search_string' |
Prometheus v2.14.0 releases cardinality | |
stats in the UI! | |
Useful queries: | |
1. sum(scrape_series_added) by (job) | |
2. sum(scrape_samples_scraped) by (job) | |
3. prometheus_tsdb_symbol_table_size_bytes | |
4. topk(10, count by (__name__)({__name__=~".+"})) |
MM2 internal topics | |
MM2 uses the following internal topics for replication purposes: | |
Heartbeat topic: Emitted from the source cluster and replicated to demonstrate connectivity through connectors. This can be used by downstream consumers to verify that the connector is running and the corresponding source cluster is available. Messages in this topic contain information on the source cluster, target cluster, and timestamp when the heartbeat was created. | |
Checkpoint topic: Emitted in the target cluster by the connector and contains consumer offsets for each consumer group in the source cluster. The connector will periodically query the source cluster for all committed offsets of consumer groups (except for replicated topics) and emit a message to this topic. Information in this message includes the consumer group id, topic, partition, upstream offset, downstream offset, metadata, and timestamp. Consumers use the checkpoint topic via MirrorClient or RemoteClusterUtils class to get the replicated offsets in the |
get deployment from pods | |
/.*pod="(\b(?<!-)(?<value>[a-z0-9]+(?:-[a-z0-9]+)*?)(?:-([a-f0-9]{10}))?-([a-z0-9]+)\b(?!-))/g | |
ref | |
- https://docs.aws.amazon.com/grafana/latest/userguide/templates-and-variables.html | |
test: | |
- https://regex101.com/r/qRiJwA/1 |
#!/bin/bash | |
set -eu -o pipefail | |
count=$(find . -depth 1 -name "*.HEIC" | wc -l | sed 's/[[:space:]]*//') | |
echo "converting $count files .HEIC files to .jpg" | |
magick mogrify -monitor -format jpg *.HEIC | |
echo "Remove .HEIC files? [y/n]" |