mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Replaced placeholder %{metric} with '*' as aligned with jordansissel
This commit is contained in:
parent
24eb0b2223
commit
4888c4ec07
2 changed files with 5 additions and 7 deletions
|
@ -12,8 +12,8 @@ class LogStash::Outputs::Graphite < LogStash::Outputs::Base
|
|||
config_name "graphite"
|
||||
plugin_status "beta"
|
||||
|
||||
DEFAULT_METRICS_FORMAT = "%{metric}"
|
||||
METRIC_PLACEHOLDER = "%{metric}"
|
||||
DEFAULT_METRICS_FORMAT = "*"
|
||||
METRIC_PLACEHOLDER = "*"
|
||||
|
||||
# The address of the graphite server.
|
||||
config :host, :validate => :string, :default => "localhost"
|
||||
|
|
|
@ -34,7 +34,7 @@ describe LogStash::Outputs::Graphite do
|
|||
port => 2003
|
||||
fields_are_metrics => true
|
||||
include_metrics => ["foo"]
|
||||
metrics_format => "foo.bar.sys.data.%{metric}"
|
||||
metrics_format => "foo.bar.sys.data.*"
|
||||
debug => true
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ describe LogStash::Outputs::Graphite do
|
|||
port => 2003
|
||||
fields_are_metrics => true
|
||||
include_metrics => [".*"]
|
||||
metrics_format => "foo.bar.sys.data.%{metric}"
|
||||
metrics_format => "foo.bar.sys.data.*"
|
||||
debug => true
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ describe LogStash::Outputs::Graphite do
|
|||
port => 2003
|
||||
fields_are_metrics => true
|
||||
include_metrics => ["notmatchinganything"]
|
||||
metrics_format => "foo.bar.sys.data.%{metric}"
|
||||
metrics_format => "foo.bar.sys.data.*"
|
||||
debug => true
|
||||
}
|
||||
}
|
||||
|
@ -164,8 +164,6 @@ describe LogStash::Outputs::Graphite do
|
|||
|
||||
insist { lines.size } == 1
|
||||
insist { lines[0] } =~ /^foo 123.0 \d{10,}\n$/
|
||||
|
||||
puts "END - match one key with invalid metric_format"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue