Skip to content

Commit a0bb578

Browse files
committed
Adding YAML examples, formatting table, and cleaning up shell usage for Treasure Data output plugin doc. Part of issue #1941.
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent 8cc2e1c commit a0bb578

File tree

1 file changed

+41
-17
lines changed

1 file changed

+41
-17
lines changed

pipeline/outputs/treasure-data.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,63 @@ The **td** output plugin, allows to flush your records into the [Treasure Data](
66

77
The plugin supports the following configuration parameters:
88

9-
| Key | Description | Default |
10-
| :--- | :--- | :--- |
11-
| API | The [Treasure Data](http://treasuredata.com) API key. To obtain it please log into the [Console](https://console.treasuredata.com) and in the API keys box, copy the API key hash. | |
12-
| Database | Specify the name of your target database. | |
13-
| Table | Specify the name of your target table where the records will be stored. | |
14-
| Region | Set the service region, available values: US and JP | US |
15-
| Workers | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `0` |
9+
| Key | Description | Default |
10+
|:---------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|
11+
| API | The [Treasure Data](http://treasuredata.com) API key. To obtain it please log into the [Console](https://console.treasuredata.com) and in the API keys box, copy the API key hash. | |
12+
| Database | Specify the name of your target database. | |
13+
| Table | Specify the name of your target table where the records will be stored. | |
14+
| Region | Set the service region, available values: US and JP | US |
15+
| Workers | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `0` |
1616

1717
## Getting Started
1818

1919
In order to start inserting records into [Treasure Data](https://www.treasuredata.com), you can run the plugin from the command line or through the configuration file:
2020

2121
### Command Line:
2222

23-
```bash
23+
```shell
2424
fluent-bit -i cpu -o td -p API="abc" -p Database="fluentbit" -p Table="cpu_samples"
2525
```
2626

2727
Ideally you don't want to expose your API key from the command line, using a configuration file is highly desired.
2828

2929
### Configuration File
3030

31-
In your main configuration file append the following _Input_ & _Output_ sections:
31+
In your main configuration file append the following:
3232

33-
```python
33+
{% tabs %}
34+
{% tab title="fluent-bit.yaml" %}
35+
36+
```yaml
37+
pipeline:
38+
inputs:
39+
- name: cpu
40+
tag: my_cpu
41+
42+
outputs:
43+
- name: td
44+
match: '*'
45+
api: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
46+
database: fluentbit
47+
table: cpu_samples
48+
```
49+
50+
{% endtab %}
51+
{% tab title="fluent-bit.conf" %}
52+
53+
54+
```text
3455
[INPUT]
35-
Name cpu
36-
Tag my_cpu
56+
Name cpu
57+
Tag my_cpu
3758

3859
[OUTPUT]
39-
Name td
40-
Match *
41-
API 5713/e75be23caee19f8041dfa635ddfbd0dcd8c8d981
42-
Database fluentbit
43-
Table cpu_samples
60+
Name td
61+
Match *
62+
API XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
63+
Database fluentbit
64+
Table cpu_samples
4465
```
66+
67+
{% endtab %}
68+
{% endtabs %}

0 commit comments

Comments
 (0)