From 1759f36d431b460ef7f366a0dcaa23c58f3aef33 Mon Sep 17 00:00:00 2001 From: Ryan Uber Date: Tue, 14 Oct 2014 12:58:52 -0700 Subject: [PATCH] agent: Allow 'consul' service to be targeted for events. Fixes #344 --- command/agent/user_event.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/command/agent/user_event.go b/command/agent/user_event.go index 64891981f..163b59975 100644 --- a/command/agent/user_event.go +++ b/command/agent/user_event.go @@ -157,6 +157,11 @@ func (a *Agent) shouldProcessUserEvent(msg *UserEvent) bool { } if msg.ServiceFilter != "" { + // Handle "consul" service on server nodes + if a.server != nil && msg.ServiceFilter == "consul" { + return true + } + re, err := regexp.Compile(msg.ServiceFilter) if err != nil { a.logger.Printf("[ERR] agent: Failed to parse service filter '%s' for event '%s': %v",