diff --git a/config/structs.go b/config/structs.go index edc3d91..b860b2f 100644 --- a/config/structs.go +++ b/config/structs.go @@ -24,7 +24,8 @@ type ListenConfig struct { // NamespaceConfig is a struct describing single metric namespaces type NamespaceConfig struct { - Name string `hcl:",key"` - SourceFiles []string `hcl:"source_files"` - Format string `hcl:"format"` + Name string `hcl:",key"` + SourceFiles []string `hcl:"source_files"` + Format string `hcl:"format"` + Labels map[string]string `hcl:"labels"` } diff --git a/example-config.hcl b/example-config.hcl index 87c427a..b85fc10 100644 --- a/example-config.hcl +++ b/example-config.hcl @@ -6,4 +6,8 @@ namespace "nginx" { "foo.log" ] format = "$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\" \"$http_x_forwarded_for\"" + labels { + app = "magicapp" + foo = "bar" + } }