infra4talos/apps-kustomized/kube-prometheus/prometheusAdapter-configMap...

36 lines
2.3 KiB
YAML
Raw Normal View History

apiVersion: v1
data:
config.yaml: "\"resourceRules\":\n \"cpu\":\n \"containerLabel\": \"container\"\
\n \"containerQuery\": |\n sum by (<<.GroupBy>>) (\n irate (\n\
\ container_cpu_usage_seconds_total{<<.LabelMatchers>>,container!=\"\
\",pod!=\"\"}[120s]\n )\n )\n \"nodeQuery\": |\n sum by (<<.GroupBy>>)\
\ (\n 1 - irate(\n node_cpu_seconds_total{mode=\"idle\"}[60s]\n\
\ )\n * on(namespace, pod) group_left(node) (\n node_namespace_pod:kube_pod_info:{<<.LabelMatchers>>}\n\
\ )\n )\n or sum by (<<.GroupBy>>) (\n 1 - irate(\n \
\ windows_cpu_time_total{mode=\"idle\", job=\"windows-exporter\",<<.LabelMatchers>>}[4m]\n\
\ )\n )\n \"resources\":\n \"overrides\":\n \"namespace\"\
:\n \"resource\": \"namespace\"\n \"node\":\n \"resource\"\
: \"node\"\n \"pod\":\n \"resource\": \"pod\"\n \"memory\":\n\
\ \"containerLabel\": \"container\"\n \"containerQuery\": |\n sum by\
\ (<<.GroupBy>>) (\n container_memory_working_set_bytes{<<.LabelMatchers>>,container!=\"\
\",pod!=\"\"}\n )\n \"nodeQuery\": |\n sum by (<<.GroupBy>>) (\n\
\ node_memory_MemTotal_bytes{job=\"node-exporter\",<<.LabelMatchers>>}\n\
\ -\n node_memory_MemAvailable_bytes{job=\"node-exporter\",<<.LabelMatchers>>}\n\
\ )\n or sum by (<<.GroupBy>>) (\n windows_cs_physical_memory_bytes{job=\"\
windows-exporter\",<<.LabelMatchers>>}\n -\n windows_memory_available_bytes{job=\"\
windows-exporter\",<<.LabelMatchers>>}\n )\n \"resources\":\n \"\
overrides\":\n \"instance\":\n \"resource\": \"node\"\n \
\ \"namespace\":\n \"resource\": \"namespace\"\n \"pod\":\n \
\ \"resource\": \"pod\"\n \"window\": \"5m\""
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/component: metrics-adapter
app.kubernetes.io/name: prometheus-adapter
app.kubernetes.io/part-of: kube-prometheus
app.kubernetes.io/version: 0.11.1
name: adapter-config
namespace: monitoring
annotations:
argocd.argoproj.io/sync-wave: '1'