You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/user_guide/targets/target_discovery/consul_discovery.md
+22
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,28 @@ loader:
23
23
password: admin
24
24
```
25
25
26
+
### Templating with Consul
27
+
28
+
It is possible to set the target name to something other than the Consul Service ID using the `name` field under the config. The target name can be customized using [Go Templates](https://golang.org/pkg/text/template/).
29
+
30
+
In addition to setting the target name, it is also possible to use Go Templates on `event-tags` as well.
31
+
32
+
The templates use the Service under Consul, so access to things like `ID`, `Tags`, `Meta`, etc. are all available.
0 commit comments