From 5ff4f1144b317005bdcb0f84f1f61e5ce09a333b Mon Sep 17 00:00:00 2001 From: Lynette Miles Date: Wed, 2 Jul 2025 13:01:28 -0700 Subject: [PATCH 1/2] Pipeline: input: thermal: style Signed-off-by: Lynette Miles --- pipeline/inputs/thermal.md | 83 ++++++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 34 deletions(-) diff --git a/pipeline/inputs/thermal.md b/pipeline/inputs/thermal.md index 56af07975..461ad7a88 100644 --- a/pipeline/inputs/thermal.md +++ b/pipeline/inputs/thermal.md @@ -1,35 +1,42 @@ # Thermal -The **thermal** input plugin reports system temperatures periodically -- each second by default. Currently this plugin is only available for Linux. +The _Thermal_ input plugin reports system temperatures. This plugin is only available for Linux. -The following tables describes the information generated by the plugin. +The following table describes the information generated by the plugin. -| key | description | -| :--- | :--- | -| name | The name of the thermal zone, such as _thermal\_zone0_ | -| type | The type of the thermal zone, such as _x86\_pkg\_temp_ | -| temp | Current temperature in celsius | +| Key | Description | +| :-- | :---------- | +| `name` | The name of the thermal zone, such as `thermal_zone0`. | +| `type` | The type of the thermal zone, such as `x86_pkg_temp`. | +| `temp` | Current temperature in Celsius. | -## Configuration Parameters +## Configuration parameters The plugin supports the following configuration parameters: -| Key | Description | -| :--- | :--- | -| Interval\_Sec | Polling interval \(seconds\). default: 1 | -| Interval\_NSec | Polling interval \(nanoseconds\). default: 0 | -| name\_regex | Optional name filter regex. default: None | -| type\_regex | Optional type filter regex. default: None | -| Threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). Default: `false`. | +| Key | Description | Default | +| :--- | :--- | :--- | +| `Interval_Sec` | Polling interval (seconds). | `1` | +| `Interval_NSec` | Polling interval (nanoseconds). | `0` | +| `name_regex` | Optional name filter regular expression. | _none_ | +| `type_regex` | Optional type filter regular expression. | _none_ | +| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false`. | + +## Get started -## Getting Started +To get the temperature of your system, you can run the plugin from the command line or through the configuration file: -In order to get temperature\(s\) of your system, you can run the plugin from the command line or through the configuration file: +### Command line -### Command Line +Run Fluent Bit from the command line with the following command: ```bash -$ bin/fluent-bit -i thermal -t my_thermal -o stdout -m '*' +bin/fluent-bit -i thermal -t my_thermal -o stdout -m '*' +``` + +You should see output similar to the following: + +```text Fluent Bit v1.x.x * Copyright (C) 2019-2020 The Fluent Bit Authors * Copyright (C) 2015-2018 Treasure Data @@ -43,10 +50,15 @@ Fluent Bit v1.x.x [2] my_thermal: [1566099586.000083156, {"name"=>"thermal_zone0", "type"=>"x86_pkg_temp", "temp"=>59.000000}] ``` -Some systems provide multiple thermal zones. In this example monitor only _thermal\_zone0_ by name, once per minute. +Some systems provide multiple thermal zones. This example monitors only `thermal_zone0` by name, once per minute. ```bash -$ bin/fluent-bit -i thermal -t my_thermal -p "interval_sec=60" -p "name_regex=thermal_zone0" -o stdout -m '*' +bin/fluent-bit -i thermal -t my_thermal -p "interval_sec=60" -p "name_regex=thermal_zone0" -o stdout -m '*' +``` + +Which returns output similar to: + +```text Fluent Bit v1.3.0 Copyright (C) Treasure Data @@ -56,12 +68,26 @@ Copyright (C) Treasure Data [0] my_temp: [1565759602.001661061, {"name"=>"thermal_zone0", "type"=>"pch_skylake", "temp"=>48.500000}] ``` -### Configuration File +### Configuration file -In your main configuration file append the following _Input_ & _Output_ sections: +In your main configuration file append the following sections: {% tabs %} +{% tab title="fluent-bit.yaml" %} + +```yaml +pipeline: + inputs: + - name: thermal + tag: my_thermal + outputs: + - name: stdout + match: '*' +``` + +{% endtab %} {% tab title="fluent-bit.conf" %} + ```python [INPUT] Name thermal @@ -71,17 +97,6 @@ In your main configuration file append the following _Input_ & _Output_ sections Name stdout Match * ``` -{% endtab %} -{% tab title="fluent-bit.yaml" %} -```yaml -pipeline: - inputs: - - name: thermal - tag: my_thermal - outputs: - - name: stdout - match: '*' -``` {% endtab %} {% endtabs %} From a5093949abe470dc2e6adadb1e0778173df928a9 Mon Sep 17 00:00:00 2001 From: Lynette Miles <6818907+esmerel@users.noreply.github.com> Date: Thu, 3 Jul 2025 10:10:11 -0700 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Craig Norris <112565517+cnorris-cs@users.noreply.github.com> Signed-off-by: Lynette Miles <6818907+esmerel@users.noreply.github.com> --- pipeline/inputs/thermal.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pipeline/inputs/thermal.md b/pipeline/inputs/thermal.md index 461ad7a88..8834ff3d2 100644 --- a/pipeline/inputs/thermal.md +++ b/pipeline/inputs/thermal.md @@ -1,8 +1,8 @@ # Thermal -The _Thermal_ input plugin reports system temperatures. This plugin is only available for Linux. +The _Thermal_ input plugin reports system temperatures. This plugin is available only for Linux. -The following table describes the information generated by the plugin. +The following table describes the information generated by the plugin: | Key | Description | | :-- | :---------- | @@ -24,7 +24,7 @@ The plugin supports the following configuration parameters: ## Get started -To get the temperature of your system, you can run the plugin from the command line or through the configuration file: +To get the temperature of your system, you can run the plugin from the command line or through the configuration file. ### Command line @@ -50,7 +50,7 @@ Fluent Bit v1.x.x [2] my_thermal: [1566099586.000083156, {"name"=>"thermal_zone0", "type"=>"x86_pkg_temp", "temp"=>59.000000}] ``` -Some systems provide multiple thermal zones. This example monitors only `thermal_zone0` by name, once per minute. +Some systems provide multiple thermal zones. This example monitors only `thermal_zone0` by name, once per minute: ```bash bin/fluent-bit -i thermal -t my_thermal -p "interval_sec=60" -p "name_regex=thermal_zone0" -o stdout -m '*' @@ -70,7 +70,7 @@ Copyright (C) Treasure Data ### Configuration file -In your main configuration file append the following sections: +In your main configuration file append the following sections: {% tabs %} {% tab title="fluent-bit.yaml" %}