Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set server metricset in graphite as default #6757

Merged
merged 1 commit into from
Apr 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions metricbeat/docs/modules/graphite.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ beta[]

This is the graphite Module.

The default metricset is `server`.


[float]
Expand All @@ -21,15 +22,6 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: graphite
metricsets: ["server"]
enabled: true
# protocol: "udp"
# templates:
# - filter: "test.*.bash.*" # This would match metrics like test.localhost.bash.stats
# namespace: "test"
# template: ".host.shell.metric*" # test.localhost.bash.stats would become metric=stats and tags host=localhost,shell=bash
# delimiter: "_"

----

[float]
Expand Down
24 changes: 18 additions & 6 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,24 @@ metricbeat.modules:
- module: graphite
metricsets: ["server"]
enabled: true
# protocol: "udp"
# templates:
# - filter: "test.*.bash.*" # This would match metrics like test.localhost.bash.stats
# namespace: "test"
# template: ".host.shell.metric*" # test.localhost.bash.stats would become metric=stats and tags host=localhost,shell=bash
# delimiter: "_"

# Host address to listen on. Default localhost.
#host: localhost

# Listening port. Default 2003.
#port: 2003

# Protocol to listen on. This can be udp or tcp. Default udp.
#protocol: "udp"

# Receive buffer size in bytes
#receive_buffer_size: 1024

#templates:
# - filter: "test.*.bash.*" # This would match metrics like test.localhost.bash.stats
# namespace: "test"
# template: ".host.shell.metric*" # test.localhost.bash.stats would become metric=stats and tags host=localhost,shell=bash
# delimiter: "_"


#------------------------------- HAProxy Module ------------------------------
Expand Down
22 changes: 22 additions & 0 deletions metricbeat/module/graphite/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- module: graphite
metricsets: ["server"]
enabled: true

# Host address to listen on. Default localhost.
#host: localhost

# Listening port. Default 2003.
#port: 2003

# Protocol to listen on. This can be udp or tcp. Default udp.
#protocol: "udp"

# Receive buffer size in bytes
#receive_buffer_size: 1024

#templates:
# - filter: "test.*.bash.*" # This would match metrics like test.localhost.bash.stats
# namespace: "test"
# template: ".host.shell.metric*" # test.localhost.bash.stats would become metric=stats and tags host=localhost,shell=bash
# delimiter: "_"

9 changes: 0 additions & 9 deletions metricbeat/module/graphite/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
- module: graphite
metricsets: ["server"]
enabled: true
# protocol: "udp"
# templates:
# - filter: "test.*.bash.*" # This would match metrics like test.localhost.bash.stats
# namespace: "test"
# template: ".host.shell.metric*" # test.localhost.bash.stats would become metric=stats and tags host=localhost,shell=bash
# delimiter: "_"

1 change: 1 addition & 0 deletions metricbeat/module/graphite/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
This is the graphite Module.

The default metricset is `server`.
6 changes: 3 additions & 3 deletions metricbeat/module/graphite/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
// init registers the MetricSet with the central registry.
// The New method will be called after the setup of the module and before starting to fetch data
func init() {
if err := mb.Registry.AddMetricSet("graphite", "server", New); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("graphite", "server", New,
mb.DefaultMetricSet(),
)
}

// MetricSet type defines all fields of the MetricSet
Expand Down
9 changes: 0 additions & 9 deletions metricbeat/modules.d/graphite.yml.disabled
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
- module: graphite
metricsets: ["server"]
enabled: true
# protocol: "udp"
# templates:
# - filter: "test.*.bash.*" # This would match metrics like test.localhost.bash.stats
# namespace: "test"
# template: ".host.shell.metric*" # test.localhost.bash.stats would become metric=stats and tags host=localhost,shell=bash
# delimiter: "_"