Metadata-Version: 2.1
Name: fluentdctl
Version: 0.0.4
Summary: A CLI for Fluentd API
Home-page: UNKNOWN
Author: Max Anderson
Author-email: <cctpmax@gmail.com>
License: UNKNOWN
Project-URL: GitHub, https://github.com/MaxAnderson95/fluentdctl
Keywords: fluentd,cli
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Description-Content-Type: text/markdown
License-File: LICENSE

# fluentdctl

A Python CLI to interact with the Fluentd HTTP RPC API.

## Installation

From PyPi:

`pip install fluentdctl`

From source:

`python setup.py`

## Prerequisites

The fluentd RPC endpoint [must be enabled](https://docs.fluentd.org/deployment/rpc#configuration) in your fluentd endpoint.

If you wish to manage a fluentd instance running on another machine, the binding in the configuration **cannot** be to `127.0.0.1`. It must either be `0.0.0.0` (all addresses) or a specific IP of the machine. Example:

```
<system>
  rpc_endpoint 0.0.0.0:24444
</system>
```

## Usage

To flush the fluentd buffer:

```
fluentdctl flush
```

To stop the fluentd process:

```
fluentdctl stop
```

To flush and then stop the fluentd process:

```
fluentdctl flushthenstop
```

To reload the fluentd process and configuration:

```
fluentdctl reload
```

### Specify a different host or port

The commands above will run against a local instance of fluentd running on the default port of 24444.

However with each command you can optionally specify a different remote host and/or port:

```
fluentdctl flush --host remote-srv-01 --port 12345
```

OR specify them positionally

```
fluentdctl flush remote-srv-01 12345
```

### Verbose output

Finally you can also specify `--verbose` on any command to get additional output.


