Skip to content

Commit

Permalink
Merge pull request fluent#10 from nokute78/in_proc
Browse files Browse the repository at this point in the history
Add a documentation about in_proc
  • Loading branch information
edsiper authored Dec 4, 2016
2 parents 2bb284d + 0f6f542 commit 5d339d5
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* [Kernel Log Buffer](input/kmsg.md)
* [Memory Usage](input/mem.md)
* [MQTT](input/mqtt.md)
* [Process](input/proc.md)
* [Random](input/random.md)
* [Serial Interface](input/serial.md)
* [Standard Input](input/stdin.md)
Expand Down
1 change: 1 addition & 0 deletions input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The _input plugins_ defines the source from where [Fluent Bit](http://fluentbit.
| [kmsg](kmsg.md) | Kernel Log Buffer | read the Linux Kernel log buffer messages.|
| [mem](mem.md) | Memory Usage | measure the total amount of memory used on the system.|
| [mqtt](mqtt.md) | MQTT | start a MQTT server and receive publish messages. |
| [proc](proc.md) | Process | Check health of Process. |
| [random](random.md) | Random |Generate Random samples. |
| [serial](serial.md) | Serial Interface | read data information from the serial interface.|
| [stdin](stdin.md) | Standard Input | read data from the standard input. |
Expand Down
56 changes: 56 additions & 0 deletions input/proc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Process

_Process_ input plugin allows you to check how health a process is. It does the check by issuing a process every a certain interval of time.

## Configuration Parameters

The plugin supports the following configuration parameters:

| Key | Description |
| -------------|-------------------|
| Proc_Name | Name of the target Process to 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 conjuntion with the Interval\_Sec configuration key. Default value is _0_.|
| Alert | If enabled, it will only generate messages if the target process is down. By default this option is disabled.|

## Getting Started

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

The following example will check the health of _crond_ process.

```bash
$ fluent-bit -i proc -p proc_name=crond -o stdout
```

### Configuration File

In your main configuration file append the following _Input_ & _Output_ sections:

```python
[INPUT]
Name proc
Proc_Name crond
Interval_Sec 1
Interval_NSec 0

[OUTPUT]
Name stdout
Match *
```

## Testing

Once Fluent Bit is running, you will see the health of process:

```bash
$ fluent-bit -i proc -p proc_name=crond -o stdout
Fluent-Bit v0.10.0
Copyright (C) Treasure Data

[2016/12/04 19:14:52] [ info] [engine] started
[0] proc.0: [1480846493, {"alive"=>true, "proc_name"=>"crond", "pid"=>2425}]
[1] proc.0: [1480846494, {"alive"=>true, "proc_name"=>"crond", "pid"=>2425}]
[2] proc.0: [1480846495, {"alive"=>true, "proc_name"=>"crond", "pid"=>2425}]
[3] proc.0: [1480846496, {"alive"=>true, "proc_name"=>"crond", "pid"=>2425}]
```

0 comments on commit 5d339d5

Please sign in to comment.