Skip to content
Merged
Changes from all 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
39 changes: 21 additions & 18 deletions pipeline/inputs/health.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
# Health

_Health_ input plugin allows you to check how _healthy_ a TCP server is. It does the check by issuing a TCP connection every a certain interval of time.
The _Health_ input plugin lets you check how healthy a TCP server is. It checks by issuing a TCP connection at regular intervals.

## Configuration Parameters
## Configuration parameters

The plugin supports the following configuration parameters:

| Key | Description |
| Key | Description | Default |
| :--- | :--- |
| Host | Name of the target host or IP address to check. |
| Port | TCP port where to perform the connection check. |
| Interval\_Sec | Interval in seconds between the service checks. Default value is _1_. |
| Internal\_Nsec | Specify a nanoseconds interval for service checks, it works in conjunction with the Interval\_Sec configuration key. Default value is _0_. |
| Alert | If enabled, it will only generate messages if the target TCP service is down. By default this option is disabled. |
| Add\_Host | If enabled, hostname is appended to each records. Default value is _false_. |
| Add\_Port | If enabled, port number is appended to each records. Default value is _false_. |
| Threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). Default: `false`. |
| `Host` | Name of the target host or IP address. | _none_ |
| `Port` | TCP port where to perform the connection request. | _none_ |
| `Interval_Sec` | Interval in seconds between the service checks.| `1` |
| `Internal_Nsec` | Specify a nanoseconds interval for service checks. Works in conjunction with the `Interval_Sec` configuration key. | `0` |
| `Alert` | If enabled, it generates messages if the target TCP service is down. | `false` |
| `Add_Host` | If enabled, hostname is appended to each records. | `false` |
| `Add_Port` | If enabled, port number is appended to each records. | `false` |
| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |

## Getting Started
## Get started

In order to start performing the checks, you can run the plugin from the command line or through the configuration file:
To start performing the checks, you can run the plugin from the command line or through the configuration file:

### Command Line
### Command line

From the command line you can let Fluent Bit generate the checks with the following options:

```bash
$ fluent-bit -i health -p host=127.0.0.1 -p port=80 -o stdout
fluent-bit -i health -p host=127.0.0.1 -p port=80 -o stdout
```

### Configuration File
### Configuration file

In your main configuration file append the following _Input_ & _Output_ sections:
In your main configuration file append the following `Input` and `Output` sections:

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

```python
[INPUT]
Name health
Expand All @@ -47,9 +48,11 @@ In your main configuration file append the following _Input_ & _Output_ sections
Name stdout
Match *
```

{% endtab %}

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

```yaml
pipeline:
inputs:
Expand All @@ -62,10 +65,10 @@ pipeline:
- name: stdout
match: '*'
```

{% endtab %}
{% endtabs %}


## Testing

Once Fluent Bit is running, you will see some random values in the output interface similar to this:
Expand Down