Skip to content

Commit a176d25

Browse files
filter_log_to_metrics: Add interval options for metric emission (#1440)
* filter_log_to_metrics: Add interval options for metric emission Signed-off-by: Richard Treu <[email protected]> * filter_log_to_metrics: Improve interval description Thanks @alexakreizinger Co-authored-by: Alexa Kreizinger <[email protected]> Signed-off-by: Richard Treu <[email protected]> * filter_log_to_metrics: Improve example Thanks @alexakreizinger Co-authored-by: Alexa Kreizinger <[email protected]> Signed-off-by: Richard Treu <[email protected]> * filter_log_to_metrics: Correct parameter names Signed-off-by: Richard Treu <[email protected]> --------- Signed-off-by: Richard Treu <[email protected]> Co-authored-by: Alexa Kreizinger <[email protected]>
1 parent e6f0254 commit a176d25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pipeline/filters/log_to_metrics.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ The plugin supports the following configuration parameters:
2828
| kubernetes_mode | If enabled, it will automatically put pod_id, pod_name, namespace_name, docker_id and container_name into the metric as labels. This option is intended to be used in combination with the [kubernetes](./kubernetes.md) filter plugin, which fills those fields. | |
2929
| Regex | Include records in which the content of KEY matches the regular expression. | | KEY REGEX
3030
| Exclude | Exclude records in which the content of KEY matches the regular expression. | | KEY REGEX
31+
| Flush\_Interval\_Sec | The interval for metrics emission, in seconds. If **Flush\_Interval\_Sec** and **Flush\_Interval\_Nsec** are either both unset or both set to `0`, the filter emits metrics immediately after each filter match. Otherwise, if either parameter is set to a non-zero value, the filter emits metrics at the specified interval. Longer intervals help lower resource consumption in high-load situations. Default value: `0`. |
32+
| Flush\_Interval\_Nsec | The interval for metrics emission, in nanoseconds. This parameter works in conjunction with **Flush\_Interval\_Sec**. Default value: `0`. |
3133

3234
## Getting Started
3335

@@ -209,4 +211,5 @@ As you can see in the output, there are per default the buckets `0.005, 0.01, 0.
209211
Please note, that the `+Inf` bucket will always be included implicitly. The buckets in a histogram are cumulative, so a value added to one bucket will add to all larger buckets, too.
210212

211213

212-
You can also see, that all the kubernetes labels have been attached to the metric, idential to the behavior of `label_field` described in [the previous chapter](#metric-label_values). That results in two sets for the histogram.
214+
This filter also attaches Kubernetes labels to each metric, identical to the behavior of `label_field`.
215+
This results in two sets for the histogram.

0 commit comments

Comments
 (0)