Skip to content

Commit 2541f20

Browse files
authored
Update sematext howto for fluent-package (#557)
Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
1 parent ff11399 commit 2541f20

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

how-to-guides/logs-to-sematext.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,27 @@ In this guide, we'll cover the installation, setup, and basic use of this log ma
1212

1313
## Prerequisites
1414

15+
The following software/services are required to be set up correctly:
16+
17+
* [Fluentd](https://www.fluentd.org/)
18+
* [Sematext](https://sematext.com/)
19+
20+
You can install Fluentd via major packaging systems.
21+
22+
* [Installation](../installation/)
23+
1524
### Set Up Sematext
1625

1726
You need to [sign up](https://apps.sematext.com/ui/registration) and create an App. Read more in the docs [here](https://sematext.com/docs/).
1827

19-
### Set Up Fluentd \(`td-agent`\)
20-
21-
In this guide you'll install `td-agent`, the stable release of Fluentd. Please refer to the guides below for detailed installation steps:
2228

23-
* [Installation](../installation/)
29+
### Install Elasticsearch Plugin
2430

25-
Next, install the Elasticsearch plugin for Fluentd `fluent-plugin-elasticsearch`:
31+
If [`out_elasticsearch`](../output/elasticsearch.md) (fluent-plugin-elasticsearch) is not installed yet, please install it manually.
2632

27-
```text
28-
$ sudo /usr/sbin/td-agent-gem install fluent-plugin-elasticsearch --no-document
29-
```
33+
See [Plugin Management](..//installation/post-installation-guide#plugin-management) section how to install fluent-plugin-elasticsearch on your environment.
3034

31-
Now you'll configure the `td-agent` \(Fluentd\) to interface properly with Elasticsearch. Please edit `/etc/td-agent/td-agent.conf` as shown below:
35+
Now you'll configure the `fluent-package` \(Fluentd\) to interface properly with Elasticsearch. Please edit `/etc/fluent/fluentd.conf` as shown below:
3236

3337
```text
3438
# Switch to debug if you need to debug
@@ -48,10 +52,6 @@ Now you'll configure the `td-agent` \(Fluentd\) to interface properly with Elast
4852
@type forward
4953
</source>
5054
51-
<filter **>
52-
@type stdout
53-
</filter>
54-
5555
<match syslog.**>
5656
@type elasticsearch
5757
host logsene-receiver.sematext.com
@@ -72,19 +72,15 @@ Now you'll configure the `td-agent` \(Fluentd\) to interface properly with Elast
7272
</match>
7373
```
7474

75-
Once everything has been set up and configured, start `td-agent`:
75+
Once everything has been set up and configured, start `fluentd`:
7676

7777
```text
78-
# init
79-
$ sudo /etc/init.d/td-agent start
80-
81-
# or systemd
82-
$ sudo systemctl start td-agent.service
78+
$ sudo systemctl start fluentd
8379
```
8480

8581
## Set Up `rsyslogd`
8682

87-
Finally, configure forwarding logs from your `rsyslogd` to Fluentd. Please add the following line to your `/etc/rsyslog.conf`, and restart `rsyslog`. This will forward your local syslog to Fluentd, and Fluentd will forward the logs to Sematext:
83+
Finally, configure forwarding logs from your `rsyslogd` to Fluentd. Create `/etc/rsyslog.d/90-fluentd.conf`, and restart `rsyslog`. This will forward your local syslog to Fluentd, and Fluentd will forward the logs to Sematext:
8884

8985
```text
9086
*.* @127.0.0.1:42185
@@ -93,7 +89,7 @@ Finally, configure forwarding logs from your `rsyslogd` to Fluentd. Please add t
9389
Please restart the `rsyslog` service once the modification is complete:
9490

9591
```text
96-
$ sudo /etc/init.d/rsyslog restart
92+
$ sudo systemctl restart rsyslog
9793
```
9894

9995
## Store and Search Logs
@@ -120,7 +116,7 @@ To manually send logs to Sematext, please use the `logger` command:
120116
$ logger -t test foobar
121117
```
122118

123-
When debugging your `td-agent` configuration, using [`filter_stdout`](../filter/stdout.md) will be useful. All the logs including errors can be found at `/etc/td-agent/td-agent.log`.
119+
When debugging your `fluent-package` configuration, using [`filter_stdout`](../filter/stdout.md) will be useful. All the logs including errors can be found at `/etc/fluent/fluentd.log`.
124120

125121
```text
126122
<filter **>

0 commit comments

Comments
 (0)