# Thermal

The **thermal** input plugin reports system temperatures periodically -- each second by default. Currently this plugin is only available for Linux.

The following tables 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                         |

## 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  |

## Getting Started

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

```bash
$ bin/fluent-bit -i thermal -t my_thermal -o stdout -m '*'
Fluent Bit v1.x.x
* Copyright (C) 2019-2020 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2019/08/18 13:39:43] [ info] [storage] initializing...
...
[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. In this example monitor 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 '*'
Fluent Bit v1.3.0
Copyright (C) Treasure Data

[2019/08/18 13:39:43] [ info] [storage] initializing...
...
[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}]
```

### Configuration File

In your main configuration file append the following *Input* & *Output* sections:

{% tabs %}
{% tab title="fluent-bit.conf" %}

```python
[INPUT]
    Name thermal
    Tag  my_thermal

[OUTPUT]
    Name  stdout
    Match *
```

{% endtab %}

{% tab title="fluent-bit.yaml" %}

```yaml
pipeline:
    inputs:
        - name: thermal
          tag: my_thermal
    outputs:
        - name: stdout
          match: '*'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fluentbit.io/manual/3.0/pipeline/inputs/thermal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
