Skip to content

Commit

Permalink
Extend configuration structs
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich committed Oct 31, 2016
1 parent efa023b commit 33da819
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
4 changes: 4 additions & 0 deletions example-config.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 33da819

Please sign in to comment.