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

filter_log_to_metrics: Add interval options for metric emission #1440

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 3 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
5 changes: 4 additions & 1 deletion pipeline/filters/log_to_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ The plugin supports the following configuration parameters:
| 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. | |
| Regex | Include records in which the content of KEY matches the regular expression. | | KEY REGEX
| Exclude | Exclude records in which the content of KEY matches the regular expression. | | KEY REGEX
| Interval\_Sec | The interval for metrics emission, in seconds. If **Interval\_Sec** and **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`. |
| Interval\_Nsec | The interval for metrics emission, in nanoseconds. This parameter works in conjunction with **Interval\_Sec**. Default value: `0`. |

## Getting Started

Expand Down Expand Up @@ -209,4 +211,5 @@ As you can see in the output, there are per default the buckets `0.005, 0.01, 0.
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.


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.
This filter also attaches Kubernetes labels to each metric, identical to the behavior of `label_field`.
This results in two sets for the histogram.