Removed labels from new ACL denied metrics

This commit is contained in:
Pierre Souchay 2018-06-08 11:56:46 +02:00
parent 2113071ae7
commit 6c7f01ae73

View file

@ -843,7 +843,7 @@ func (l *State) deleteService(id string) error {
// todo(fs): some backoff strategy might be a better solution // todo(fs): some backoff strategy might be a better solution
l.services[id].InSync = true l.services[id].InSync = true
l.logger.Printf("[WARN] agent: Service %q deregistration blocked by ACLs", id) l.logger.Printf("[WARN] agent: Service %q deregistration blocked by ACLs", id)
metrics.IncrCounterWithLabels([]string{"acl", "blocked", "service", "deregistration"}, 1, []metrics.Label{{Name: "id", Value: id}}) metrics.IncrCounter([]string{"acl", "blocked", "service", "deregistration"}, 1)
return nil return nil
default: default:
@ -881,7 +881,7 @@ func (l *State) deleteCheck(id types.CheckID) error {
// todo(fs): some backoff strategy might be a better solution // todo(fs): some backoff strategy might be a better solution
l.checks[id].InSync = true l.checks[id].InSync = true
l.logger.Printf("[WARN] agent: Check %q deregistration blocked by ACLs", id) l.logger.Printf("[WARN] agent: Check %q deregistration blocked by ACLs", id)
metrics.IncrCounterWithLabels([]string{"acl", "blocked", "check", "deregistration"}, 1, []metrics.Label{{Name: "id", Value: string(id)}}) metrics.IncrCounter([]string{"acl", "blocked", "check", "deregistration"}, 1)
return nil return nil
default: default:
@ -952,7 +952,7 @@ func (l *State) syncService(id string) error {
l.checks[check.CheckID].InSync = true l.checks[check.CheckID].InSync = true
} }
l.logger.Printf("[WARN] agent: Service %q registration blocked by ACLs", id) l.logger.Printf("[WARN] agent: Service %q registration blocked by ACLs", id)
metrics.IncrCounterWithLabels([]string{"acl", "blocked", "service", "registration"}, 1, []metrics.Label{{Name: "id", Value: id}}) metrics.IncrCounter([]string{"acl", "blocked", "service", "registration"}, 1)
return nil return nil
default: default:
@ -998,7 +998,7 @@ func (l *State) syncCheck(id types.CheckID) error {
// todo(fs): some backoff strategy might be a better solution // todo(fs): some backoff strategy might be a better solution
l.checks[id].InSync = true l.checks[id].InSync = true
l.logger.Printf("[WARN] agent: Check %q registration blocked by ACLs", id) l.logger.Printf("[WARN] agent: Check %q registration blocked by ACLs", id)
metrics.IncrCounterWithLabels([]string{"acl", "blocked", "check", "registration"}, 1, []metrics.Label{{Name: "check", Value: string(id)}}) metrics.IncrCounter([]string{"acl", "blocked", "check", "registration"}, 1)
return nil return nil
default: default:
@ -1030,7 +1030,7 @@ func (l *State) syncNodeInfo() error {
// todo(fs): some backoff strategy might be a better solution // todo(fs): some backoff strategy might be a better solution
l.nodeInfoInSync = true l.nodeInfoInSync = true
l.logger.Printf("[WARN] agent: Node info update blocked by ACLs") l.logger.Printf("[WARN] agent: Node info update blocked by ACLs")
metrics.IncrCounterWithLabels([]string{"acl", "blocked", "node", "registration"}, 1, []metrics.Label{{Name: "id", Value: string(l.config.NodeID)}, {Name: "name", Value: l.config.NodeName}}) metrics.IncrCounter([]string{"acl", "blocked", "node", "registration"}, 1)
return nil return nil
default: default: