Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Commit

Permalink
implemented an ignore filter for prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
nustiueudinastea committed Mar 24, 2017
1 parent a815a68 commit 214cac2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ func discoverSwarm(prometheusContainerID string) {

var containerIPs []string

if _, ok := task.Spec.ContainerSpec.Labels["prometheus.ignore"]; ok {
logger.Debugf("Task %s ignored by Prometheus", task.ID)
continue
}

for _, netatt := range task.NetworksAttachments {
if netatt.Network.Spec.Name == "ingress" || netatt.Network.DriverState.Name != "overlay" {
continue
Expand Down

0 comments on commit 214cac2

Please sign in to comment.