Grafana
$__interval vs $__rate_interval
Section titled “$__interval vs $__rate_interval”tldr: use $__rate_interval with prometheus
Prometheus magic
Section titled “Prometheus magic”# get all metrics names for recent data:# see https://promlabs.com/blog/2020/12/17/promql-queries-for-exploring-your-metricsgroup by(__name__) ({__name__!=""})
# Getting all series in the TSDB from recent data:{__name__!=""}
# näppärä loitsu, näyttää time seriesin labeleitten cardinaliteetinsort_desc(label_replace(count by(__name__) ({__name__=~".+"}), "name", "$1", "__name__", "(.+)"))
CloudWatch queries
Section titled “CloudWatch queries”CodeBuild logs
Section titled “CodeBuild logs”CodeBuild phases from logs
Section titled “CodeBuild phases from logs”fields @timestamp, @message| FILTER @message LIKE /Entering phase|Phase complete/| sort @timestamp asc
Promlens w/ M$ alb oidc
Section titled “Promlens w/ M$ alb oidc”# Port-forward Grafana to localhost 3000kubectl -n monitoring port-forward pods/grafana-0 3000
export GRAFANA_API_TOKEN=xxxxexport GRAFANA_URL=http://localhost:3000docker run -p 8080:8080 --net="host" prom/promlens --grafana.url=$GRAFANA_URL --grafana.api-token=$GRAFANA_API_TOKEN