Hello Community, 

I have rules file created for alerts, and i want to defined global labels 
for my rules. Is it possible?? I have not got much info about it in 
Prometheus docs.

Below is my rules file:

groups:                                                                    
                                                                            
                     
- name: ContainerAlerts
  rules:
  - alert: ContainerKilled
    expr: (sum by(name, instance) (time() - container_last_seen{id!="/"})) 
> 30
    for: 10s
    labels:
      datacenter: DC:Test                                                  
                                                                            
                           severity: warning
    annotations:
      summary: "Container killed (instance {{ $labels.instance }})"
      description: "Container '{{ $labels.name }}' has disappeared from '{{ 
humanizeDuration $value }}' seconds on Node_ID: '{{ $labels.instance }}'"

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/091c30c6-c0ba-4631-88d1-f99ea1c40010n%40googlegroups.com.

Reply via email to