This codec will encode and decode Graphite formated lines.
# with an input plugin:
# you can also use this codec with an output.
input {
file {
codec => graphite {
exclude_metrics => ... # array (optional), default: ["%{[^}]+}"]
fields_are_metrics => ... # boolean (optional), default: false
include_metrics => ... # array (optional), default: [".*"]
metrics => ... # hash (optional), default: {}
metrics_format => ... # string (optional), default: "*"
}
}
}
Exclude regex matched metric names, by default exclude unresolved %{field} strings
Indicate that the event @fields should be treated as metrics and will be sent as is to graphite
Include only regex matched metric names
The metric(s) to use. This supports dynamic strings like %{host} for metric names and also for values. This is a hash field with key of the metric name, value of the metric value. Example:
[ "%{host}/uptime", "%{uptime_1m}" ]
The value will be coerced to a floating point value. Values which cannot be coerced will zero (0)
Defines format of the metric string. The placeholder ‘*’ will be replaced with the name of the actual metric.
metrics_format => "foo.bar.*.sum"
NOTE: If no metrics_format is defined the name of the metric will be used as fallback.