forked from openshift/network-metrics-daemon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path05_prometheus_rules.yaml
29 lines (29 loc) · 1.9 KB
/
05_prometheus_rules.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: network-metrics-with-network-name
namespace: $MONITORING_NAMESPACE
labels:
app: network-metrics
prometheus: k8s
role: alert-rules
spec:
groups:
- name: network_with_name
rules:
- record: network:container_network_receive_bytes_total
expr: (container_network_receive_bytes_total) + on(namespace,pod,interface) group_left(network_name) ( pod_network_name_info )
- record: network:container_network_receive_errors_total
expr: (container_network_receive_errors_total) + on(namespace,pod,interface) group_left(network_name) ( pod_network_name_info )
- record: network:container_network_receive_packets_total
expr: (container_network_receive_packets_total) + on(namespace,pod,interface) group_left(network_name) ( pod_network_name_info )
- record: network:container_network_receive_packets_dropped_total
expr: (container_network_receive_packets_dropped_total) + on(namespace,pod,interface) group_left(network_name) ( pod_network_name_info )
- record: network:container_network_transmit_bytes_total
expr: (container_network_transmit_bytes_total) + on(namespace,pod,interface) group_left(network_name) ( pod_network_name_info )
- record: network:container_network_transmit_errors_total
expr: (container_network_transmit_errors_total) + on(namespace,pod,interface) group_left(network_name) ( pod_network_name_info )
- record: network:container_network_transmit_packets_total
expr: (container_network_transmit_packets_total) + on(namespace,pod,interface) group_left(network_name) ( pod_network_name_info )
- record: network:container_network_transmit_packets_dropped_total
expr: (container_network_transmit_packets_dropped_total) + on(namespace,pod,interface) group_left(network_name) ( pod_network_name_info )