Process Exporter Metrics
A plugin based on Process Exporter to collect process level of metrics of system metrics
Prometheus Node Exporter is a popular way to collect system level metrics from operating systems, such as CPU / Disk / Network / Process statistics. Fluent Bit 2.2 onwards includes a process exporter plugin that builds off the Prometheus design to collect process level metrics without having to manage two separate processes or agents.
The Process Exporter Metrics plugin implements collecting of the various metrics available from the 3rd party implementation of Prometheus Process Exporter and these will be expanded over time as needed.
Important note: All metrics including those collected with this plugin flow through a separate pipeline from logs and current filters do not operate on top of metrics.
This plugin is only supported on Linux based operating systems as it uses the proc
filesystem to access the relevant metrics.
macOS does not have the proc
filesystem so this plugin will not work for it.
Configuration
Key | Description | Default |
---|---|---|
scrape_interval | The rate at which metrics are collected. | 5 seconds |
path.procfs | The mount point used to collect process information and metrics. Read-only is enough | /proc/ |
process_include_pattern | regex to determine which names of processes are included in the metrics produced by this plugin | It is applied for all process unless explicitly set. Default is |
process_exclude_pattern | regex to determine which names of processes are excluded in the metrics produced by this plugin | It is not applied unless explicitly set. Default is |
metrics | To specify which process level of metrics are collected from the host operating system. These metrics depend on |
|
Metrics Available
Name | Description |
---|---|
cpu | Exposes CPU statistics from |
io | Exposes I/O statistics from |
memory | Exposes memory statistics from |
state | Exposes process state statistics from |
context_switches | Exposes context_switches statistics from |
fd | Exposes file descriptors statistics from |
start_time | Exposes start_time statistics from |
thread_wchan | Exposes thread_wchan from |
thread | Exposes thread statistics from |
Getting Started
Simple Configuration File
In the following configuration file, the input plugin _process_exporter_metrics collects _metrics every 2 seconds and exposes them through our Prometheus Exporter output plugin on HTTP/TCP port 2021.
You can see the metrics by using curl:
Container to Collect Host Metrics
When deploying Fluent Bit in a container you will need to specify additional settings to ensure that Fluent Bit has access to the process details. The following docker
command deploys Fluent Bit with a specific mount path for procfs
and settings enabled to ensure that Fluent Bit can collect from the host. These are then exposed over port 2021.
Enhancement Requests
Development prioritises a subset of the available collectors in the the 3rd party implementation of Prometheus Process Exporter, to request others please open a Github issue by using the following template: - in_process_exporter_metrics
Last updated