自定义 PrometheusRule
PrometheusRule 介绍
PrometheusRule是安装prometheus-operator时默认安装的自定义资源对象(CRD),用来管理Prometheus上的告警规则,后面增删改查规则都可以通过这个资源对象查询。
查询默认加入的规则
# kubectl get prometheusrules -n prometheus-test
NAME AGE
prom-test-prometheus-opera-alertmanager.rules 4d1h
prom-test-prometheus-opera-etcd 4d1h
prom-test-prometheus-opera-general.rules 4d1h
prom-test-prometheus-opera-k8s.rules 4d1h
prom-test-prometheus-opera-kube-apiserver.rules 4d1h
prom-test-prometheus-opera-kube-prometheus-node-recording.rules 4d1h
prom-test-prometheus-opera-kube-scheduler.rules 4d1h
prom-test-prometheus-opera-kubernetes-absent 4d1h
prom-test-prometheus-opera-kubernetes-apps 4d1h
prom-test-prometheus-opera-kubernetes-resources 4d1h
prom-test-prometheus-opera-kubernetes-storage 4d1h
prom-test-prometheus-opera-kubernetes-system 4d1h
prom-test-prometheus-opera-kubernetes-system-apiserver 4d1h
prom-test-prometheus-opera-kubernetes-system-controller-manager 4d1h
prom-test-prometheus-opera-kubernetes-system-kubelet 4d1h
prom-test-prometheus-opera-kubernetes-system-scheduler 4d1h
prom-test-prometheus-opera-node-exporter 4d1h
prom-test-prometheus-opera-node-exporter.rules 4d1h
prom-test-prometheus-opera-node-network 4d1h
prom-test-prometheus-opera-node-time 4d1h
prom-test-prometheus-opera-node.rules 4d1h
prom-test-prometheus-opera-prometheus 4d1h
prom-test-prometheus-opera-prometheus-operator 4d1h