{% hint style="info" %}
Supported event types: logs
{% endhint %}
The Thermal input plugin reports system temperatures. This plugin is available only for Linux.
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. |
The plugin supports the following configuration parameters:
| Key | Description | Default |
|---|---|---|
interval_nsec |
Polling interval (nanoseconds). | 0 |
interval_sec |
Polling interval (seconds). | 1 |
name_regex |
Optional name filter regular expression. | none |
threaded |
Indicates whether to run this input in its own thread. | false |
type_regex |
Optional type filter regular expression. | none |
To get the temperature of your system, you can run the plugin from the command line or through the configuration file.
Run Fluent Bit from the command line with the following command:
fluent-bit -i thermal -t my_thermal -o stdout -m '*'You should see output similar to the following:
...
[0] my_thermal: [1566099584.000085820, {"name"=>"thermal_zone0", "type"=>"x86_pkg_temp", "temp"=>60.000000}]
[1] my_thermal: [1566099585.000136466, {"name"=>"thermal_zone0", "type"=>"x86_pkg_temp", "temp"=>59.000000}]
[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:
fluent-bit -i thermal -t my_thermal -p "interval_sec=60" -p "name_regex=thermal_zone0" -o stdout -m '*'Which returns output similar to:
...
[0] my_temp: [1565759542.001053749, {"name"=>"thermal_zone0", "type"=>"pch_skylake", "temp"=>48.500000}]
[0] my_temp: [1565759602.001661061, {"name"=>"thermal_zone0", "type"=>"pch_skylake", "temp"=>48.500000}]
...
In your main configuration file append the following:
{% tabs %} {% tab title="fluent-bit.yaml" %}
pipeline:
inputs:
- name: thermal
tag: my_thermal
outputs:
- name: stdout
match: '*'{% endtab %} {% tab title="fluent-bit.conf" %}
[INPUT]
Name thermal
Tag my_thermal
[OUTPUT]
Name stdout
Match *
{% endtab %} {% endtabs %}