Skip to content

Commit 36441e2

Browse files
committed
Adding YAML examples and layout fixes for LoogDNA output plugin. Part of issue #1916.
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent f961653 commit 36441e2

File tree

1 file changed

+42
-15
lines changed

1 file changed

+42
-15
lines changed

pipeline/outputs/logdna.md

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,36 @@ When the plugin process each record \(or log\), it tries to lookup for specific
106106

107107
## Getting Started
108108

109-
The following configuration example, will emit a dummy example record and ingest it on LogDNA. Copy and paste the following content in a file called `logdna.conf`:
109+
The following configuration example, will emit a dummy example record and ingest it on LogDNA. In your main configuration file append the following:
110+
111+
{% tabs %}
112+
{% tab title="fluent-bit.yaml" %}
113+
114+
```yaml
115+
service:
116+
flush: 1
117+
log_level: info
118+
119+
pipeline:
120+
inputs:
121+
- name: dummy
122+
dummy: '{"log":"a simple log message", "severity": "INFO", "meta": {"s1": 12345, "s2": true}, "app": "Fluent Bit"}'
123+
samples: 1
124+
125+
outputs:
126+
- name: logdna
127+
match: '*'
128+
api_key: YOUR_API_KEY_HERE
129+
hostname: my-hostname
130+
ip: 192.168.1.2
131+
mac: aa:bb:cc:dd:ee:ff
132+
tags: aa, bb
133+
```
134+
135+
{% endtab %}
136+
{% tab title="fluent-bit.conf" %}
110137
111-
```python
138+
```text
112139
[SERVICE]
113140
flush 1
114141
log_level info
@@ -128,29 +155,29 @@ The following configuration example, will emit a dummy example record and ingest
128155
tags aa, bb
129156
```
130157

131-
run Fluent Bit with the new configuration file:
158+
{% endtab %}
159+
{% endtabs %}
132160

133-
```text
134-
fluent-bit -c logdna.conf
161+
Run Fluent Bit with the new configuration file:
162+
163+
```shell
164+
# For YAML configuration.
165+
fluent-bit --config fluent-bit.yaml
166+
167+
# For classic configuration.
168+
fluent-bit --config fluent-bit.conf
135169
```
136170

137171
Fluent Bit output:
138172

139173
```text
140-
Fluent Bit v1.5.0
141-
* Copyright (C) 2019-2020 The Fluent Bit Authors
142-
* Copyright (C) 2015-2018 Treasure Data
143-
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
144-
* https://fluentbit.io
145-
146-
[2020/04/07 17:44:37] [ info] [storage] version=1.0.3, initializing...
147-
[2020/04/07 17:44:37] [ info] [storage] in-memory
148-
[2020/04/07 17:44:37] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
174+
...
149175
[2020/04/07 17:44:37] [ info] [engine] started (pid=2157706)
150176
[2020/04/07 17:44:37] [ info] [output:logdna:logdna.0] configured, hostname=monox-fluent-bit-2
151177
[2020/04/07 17:44:37] [ info] [sp] stream processor started
152178
[2020/04/07 17:44:38] [ info] [output:logdna:logdna.0] logs.logdna.com:443, HTTP status=200
153179
{"status":"ok","batchID":"f95849a8-ec6c-4775-9d52-30763604df9b:40710:ld72"}
180+
...
154181
```
155182

156183
Your record will be available and visible in your LogDNA dashboard after a few seconds.
@@ -159,4 +186,4 @@ Your record will be available and visible in your LogDNA dashboard after a few s
159186

160187
In your LogDNA dashboard, go to the top filters and mark the Tags `aa` and `bb`, then you will be able to see your records as the example below:
161188

162-
![](../../.gitbook/assets/logdna.png)
189+
![](../../.gitbook/assets/logdna.png)

0 commit comments

Comments
 (0)