Skip to content

Commit 5cdfd77

Browse files
committed
update flunet bit output plugin docs
1 parent 344437f commit 5cdfd77

File tree

1 file changed

+86
-79
lines changed

1 file changed

+86
-79
lines changed

src/content/docs/logs/forward-logs/fluent-bit-plugin-log-forwarding.mdx

+86-79
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ tags:
44
- Logs
55
- Enable log management in New Relic
66
- Enable log monitoring in New Relic
7+
- Fluent Bit
78
translate:
89
- kr
910
metaDescription: 'Install and configure the New Relic logging plugin for Fluent Bit, so you can use enhanced log management capabilities.'
@@ -13,117 +14,120 @@ redirects:
1314
- /docs/logs/enable-logs/enable-logs/fluent-bit-plugin-logs
1415
- /docs/logs/enable-log-monitoring-new-relic/enable-log-monitoring-new-relic/fluent-bit-plugin-log-forwarding
1516
- /docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/fluent-bit-plugin-log-forwarding
16-
freshnessValidatedDate: never
17+
freshnessValidatedDate: 2024-10-30
1718
---
1819

1920
If your log data is already being monitored by [Fluent Bit](https://fluentbit.io/), you can use our Fluent Bit output plugin to forward and enrich your log data in New Relic.
2021

21-
Forwarding your Fluent Bit logs to New Relic will give you enhanced <InlinePopover type="logs"/> capabilities to collect, process, explore, query, and alert on your log data.
22+
Forwarding your Fluent Bit logs to New Relic will give you enhanced <InlinePopover type="logs"/> capabilities to collect, process, explore, query, and alert on your log data. You have these options to install the Fluent Bit:
2223

23-
## Basic process [#compatibility-requirements]
24+
* [Kubernetes installation](#k8s-installation)
25+
* [Using a Docker image](#helm-docker-image)
26+
* [On-host installation](#on-host-installation)
2427

25-
We have published a container with the plugin installed. It serves as a base image to be used by our Kubernetes integration. We recommend you use this base image and layer your own custom configuration files.
28+
## Kubernetes installation [#k8s-installation]
2629

27-
To forward your logs from Fluent Bit to New Relic:
30+
New Relic has a [Fluent Bit output plugin](https://github.com/newrelic/newrelic-fluent-bit-output) to forward your logs to New Relic log management. You can install this plugin as a standalone Docker image in a Kubernetes cluster, where it functions as a DaemonSet, also known as the Kubernetes plugin.
2831

29-
1. Make sure you have:
30-
* A New Relic <InlinePopover type="licenseKey"/>
31-
* Fluent Bit 1.0 or higher (recommended), although v0.12 or higher is supported
32-
* Fluent Bit Windows install directions can be found [here](https://docs.fluentbit.io/manual/installation/windows)
33-
* Fluent Bit Linux install directions can be found [here](https://docs.fluentbit.io/manual/installation/linux)
34-
2. [Install](#fluentbit-plugin) the Fluent Bit plugin.
35-
3. [Configure](#configure-plugin) the Fluent Bit plugin.
36-
4. [Test](#test-plugin) the Fluent Bit plugin.
37-
5. Generate some traffic and wait a few minutes, then [check your account](#find-data) for data.
32+
You can install it in your cluster using our [Helm chart](https://github.com/newrelic/helm-charts/tree/master) in two ways:
3833

39-
## Install the Fluent Bit plugin [#fluentbit-plugin]
34+
* Through our guided install
35+
* Manual installation
4036

41-
To install the Fluent Bit plugin:
37+
### Using our guided install [#helm-guided-install]
4238

43-
1. Navigate to New Relic's [Fluent Bit plugin repository on GitHub](https://github.com/newrelic/newrelic-fluent-bit-output).
44-
2\. From the repository page, [clone or download the repository](https://help.github.com/en/articles/cloning-a-repository).
45-
3\. Run the following command to build your plugin:
39+
Although the [`newrelic-logging`](https://github.com/newrelic/helm-charts/tree/master/charts/newrelic-logging) chart works as a standalone, we recommend installing it as part of the [`nri-bundle`](https://github.com/newrelic/helm-charts/tree/master/charts/nri-bundle) chart.
4640

47-
```sh
48-
cd newrelic-fluent-bit-output && make all
49-
```
41+
The best way to install this is through our [guided installation](/install/kubernetes/) process. This guided install generates the Helm commands required to install it.
5042

51-
2. Store `out_newrelic.so` or `out_newrelic_winXX.dll` at a location that can be accessed by the `fluent-bit` daemon.
43+
### Manual installation
5244

53-
<Callout variant="tip">
54-
If you'd rather not compile the plugin yourself, you can download pre-compiled versions from our [GitHub repository's releases page](https://github.com/newrelic/newrelic-fluent-bit-output/releases).
55-
</Callout>
45+
You can install it manually using Helm, although this option is not recommended. Run this command to install the repo:
5646

57-
## Upgrade the Fluent Bit plugin [#upgrade-plugin]
47+
```bash
48+
helm repo add newrelic https://helm-charts.newrelic.com
49+
```
5850

59-
Before you upgrade your Fluent Bit plugin, run the following NRQL query to find the current versions of the output plugin being used in your system:
51+
To update the repo, run this command:
6052

61-
```sql
62-
FROM K8sContainerSample
63-
SELECT latest(containerImage)
64-
WHERE podName like '%newrelic-logging%'
65-
FACET clusterName
53+
```bash
54+
helm repo update newrelic
6655
```
6756

68-
<Callout variant="caution">
69-
Fluent Bit output plugin versions 1.16.0 through 1.19.2 are affected by a [security vulnerability (CVE-2024-4323)](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-4323). If you're using one of these versions, upgrade to version 2.0.0 or higher. For more information on this, see our [security bulletin NR24-01 - Fluent Bit](/docs/security/new-relic-security/security-bulletins/security-bulletin-nr24-01/).
57+
<Callout variant="tip">
58+
See our [supported configuration parameters](https://github.com/newrelic/helm-charts/tree/master/charts/newrelic-logging#supported-configuration-parameters) in our `newrelic-logging` Helm chart.
7059
</Callout>
7160

72-
To upgrade, follow the [installation instructions](#fluentbit-plugin) or grab the latest pre-compiled version from our [GitHub repository](https://github.com/newrelic/newrelic-fluent-bit-output/releases).
61+
See [Uninstall Kubernetes integration](/docs/kubernetes-pixie/kubernetes-integration/installation/uninstall-kubernetes/) if you want to uninstall it.
7362

74-
## Install Fluent Bit output plugin [#fluent-bit]
63+
## Using a Docker image [#helm-docker-image]
7564

76-
New Relic has a [Fluent Bit](https://fluentbit.io/) [output plugin](https://github.com/newrelic/newrelic-fluent-bit-output) to forward your logs to New Relic log management. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, also known as the Kubernetes plugin.
65+
If you've your own custom kubernetes integration, we recommend using our [Docker image](https://hub.docker.com/r/newrelic/newrelic-fluentbit-output) that comes with the [`newrelic-fluent-bit-output`](https://github.com/newrelic/newrelic-fluent-bit-output) plugin. Or you can use the Docker image as a base image and layer your own custom configuration files.
7766

78-
You can install it in your cluster using our Helm chart in two ways.
67+
## On-host installation [#on-host-installation]
7968

80-
### Use our guided install [#helm-guided-install]
69+
For an on-host installation of the Fluent Bit plugin, follow these steps:
8170

82-
Although the [newrelic-logging](https://github.com/newrelic/helm-charts/tree/master/charts/newrelic-logging) chart works as a standalone, we recommend installing it as part of the [nri-bundle](https://github.com/newrelic/helm-charts/tree/master/charts/nri-bundle) chart.
71+
1. Open the New Relic's [Fluent Bit plugin repository](https://github.com/newrelic/newrelic-fluent-bit-output) on GitHub.
8372

84-
The best way to install this is through our [guided installation](/docs/kubernetes-pixie/kubernetes-integration/installation/kubernetes-integration-install-configure/) process. This guided install can generate the Helm 3 commands required to install it ([see "Helm 3"](/docs/kubernetes-pixie/kubernetes-integration/installation/kubernetes-integration-install-configure/#finish-your-install)).
73+
2. From the repository page, [clone or download the repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).
8574

86-
### Manual installation [#manual-helm-install]
75+
3. Run this command to build your plugin:
8776

88-
Alternately, you can install it manually using Helm, by running this command to install the repo:
77+
```sh
78+
cd newrelic-fluent-bit-output && make all
79+
```
8980

90-
```bash
91-
helm repo add newrelic https://helm-charts.newrelic.com
92-
```
81+
4. Store `out_newrelic.so` or `out_newrelic_winXX.dll` at a location where `fluent-bit` daemon can access them.
9382

94-
To update the repo you can run:
83+
<Callout variant="tip">
84+
If you'd rather not compile the plugin yourself, download pre-compiled versions from our [GitHub repository's releases page](https://github.com/newrelic/newrelic-fluent-bit-output/releases).
85+
</Callout>
9586

96-
```bash
97-
helm repo update newrelic
87+
### Upgrade the Fluent Bit plugin [#upgrade-plugin]
88+
89+
Before you upgrade your Fluent Bit plugin, run the following NRQL query to find the current versions of the output plugin you're using in your system:
90+
91+
```sql
92+
FROM K8sContainerSample
93+
SELECT latest(containerImage)
94+
WHERE podName like '%newrelic-logging%'
95+
FACET clusterName
9896
```
9997

100-
Go here for [uninstallation instructions](/docs/kubernetes-pixie/kubernetes-integration/uninstall-kubernetes/).
98+
<Callout variant="caution">
99+
The [security vulnerability (CVE-2024-4323)](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-4323) affects Fluent Bit output plugin versions 1.16.0-1.19.2. If you're using one of these versions, update to version 2.0.0 or higher. For more information on this, see our security bulletin [NR24-01 - Fluent Bit](/docs/security/new-relic-security/security-bulletins/security-bulletin-nr24-01/).
100+
</Callout>
101+
102+
To update, follow the installation instructions or grab the latest pre-compiled version from our [GitHub repository](https://github.com/newrelic/newrelic-fluent-bit-output/releases).
101103

102104
## Configure the Fluent Bit plugin [#configure-plugin]
103105

104-
Fluent Bit needs to know the location of the New Relic plugin and the New Relic <InlinePopover type="licenseKey"/> to output data to New Relic. To configure your Fluent Bit plugin:
106+
Fluent Bit needs to know the location of the New Relic plugin and the New Relic <InlinePopover type="licenseKey"/> to output data to New Relic.
105107

106108
<Callout variant="important">
107109
Pay attention to white space when editing your config files. Be sure to use four spaces to indent and one space between keys and values.
108110
</Callout>
109111

110-
1. Locate or create a `plugins.conf` file in your plugins directory.
112+
To configure your Fluent Bit plugin, follow these steps:
113+
114+
1. Locate or create the `plugins.conf` file in your plugins directory.
111115

112116
2. In the `plugins.conf` file, add a reference to `out_newrelic.so`, adjacent to your `fluent-bit.conf` file:
113117

114-
```ini
115-
[PLUGINS]
116-
Path /PATH/TO/newrelic-fluent-bit-output/out_newrelic.so
117-
```
118+
```ini
119+
[PLUGINS]
120+
Path /PATH/TO/newrelic-fluent-bit-output/out_newrelic.so
121+
```
118122

119123
3. In the `fluent-bit.conf` file, add the following line under the `service` block:
120124

121-
```ini
122-
[SERVICE]
123-
# This is the main configuration block for fluent bit.
124-
# Ensure the follow line exists somewhere in the SERVICE block
125-
Plugins_File plugins.conf
126-
```
125+
```ini
126+
[SERVICE]
127+
# This is the main configuration block for fluent bit.
128+
# Ensure the follow line exists somewhere in the SERVICE block
129+
Plugins_File plugins.conf
130+
```
127131

128132
4. At the bottom of the `fluent-bit.conf` file, add the following to set up the input, filter, and output sections. Replace the placeholder text with your <InlinePopover type="licenseKey"/>:
129133

@@ -162,30 +166,29 @@ Fluent Bit needs to know the location of the New Relic plugin and the New Relic
162166
licenseKey YOUR_LICENSE_KEY
163167
```
164168

165-
5. Restart your Fluent Bit instance with the following command:
169+
5. Restart your Fluent Bit instance. Run this command:
166170

167171
```sh
168172
fluent-bit -c /PATH/TO/fluent-bit.conf
169173
```
170174

171-
<InstallFeedback/>
172-
173175
## Test the Fluent Bit plugin [#test-plugin]
174176

175177
To test if your Fluent Bit plugin is receiving input from a log file:
176178

177-
1. Run the following command to append a test log message to your log file:
179+
1. Run this command to append a test log message to your log file:
178180

179181
```sh
180182
echo "test message" >> /PATH/TO/YOUR/LOG/FILE
181183
```
182-
2. Search our [logs UI](https://one.newrelic.com/launcher/logger.log-launcher) for `test message`.
183184

184-
For more options, see the [Fluent Bit modify filter documentation](https://docs.fluentbit.io/manual/pipeline/filters/modify) and our documentation to [forward your logs using the infrastructure agent](/docs/logs/enable-log-management-new-relic/enable-log-monitoring-new-relic/forward-your-logs-using-infrastructure-agent/#automatically-inserted-attributes).
185+
2. Search for `test message` in our [logs UI](https://one.newrelic.com/launcher/logger.log-launcher) .
186+
187+
For more options, see [the `modify` filter on the Fluent Bit documentation](https://docs.fluentbit.io/manual/pipeline/filters/modify). See also our documentation to [forward your logs using the infrastructure agent](/docs/logs/forward-logs/forward-your-logs-using-infrastructure-agent/#automatically-inserted-attributes).
185188

186189
## Optional: Configure plugin attributes [#instrument-plugin]
187190

188-
Once you have [installed](#fluentbit-plugin) and [configured](#configure-plugin) the Fluent Bit plugin, you can use the following attributes to configure how the plugin sends data to New Relic:
191+
Once you've installed and [configured](#configure-plugin) the Fluent Bit plugin, you can use the following attributes to configure how the plugin sends data to New Relic:
189192

190193
<table>
191194
<thead>
@@ -237,7 +240,7 @@ Once you have [installed](#fluentbit-plugin) and [configured](#configure-plugin)
237240
</td>
238241

239242
<td>
240-
<DNT>**Deprecated.**</DNT> Takes a New Relic [Insights insert key](/docs/insights/insights-data-sources/custom-data/send-custom-events-event-api#register), but using the `licenseKey` attribute is preferred. Use either `licenseKey` or `apiKey`, not both.
243+
<DNT>**Deprecated.**</DNT> Takes a New Relic [insights insert key](/docs/insights/insights-data-sources/custom-data/send-custom-events-event-api#register), but using the `licenseKey` attribute is preferred. Use either `licenseKey` or `apiKey`, not both.
241244
</td>
242245
</tr>
243246

@@ -247,33 +250,37 @@ Once you have [installed](#fluentbit-plugin) and [configured](#configure-plugin)
247250
</td>
248251

249252
<td>
250-
Defaults to `https://log-api.newrelic.com/log/v1` - If using an EU key needs to be set to `https://log-api.eu.newrelic.com/log/v1`
253+
Defaults to `https://log-api.newrelic.com/log/v1`. If you're using an EU key, you need set it to `https://log-api.eu.newrelic.com/log/v1`
251254
</td>
252255
</tr>
253256
</tbody>
254257
</table>
255258

256259
## View log data [#find-data]
257260

258-
If everything is configured correctly and your data is being collected, you should see log data in both of these places:
261+
If you configured everything correctly and New Relic collects your data, you should see log data in both of these places:
259262

260263
* Our [logs UI](https://one.newrelic.com/launcher/logger.log-launcher)
261-
* Our tools for running [NRQL queries](/docs/chart-builder/use-chart-builder/choose-data/use-advanced-nrql-mode-specify-data). For example, you can execute a query like this:
264+
265+
* Our tools for running [NRQL queries](/docs/query-your-data/explore-query-data/query-builder/use-advanced-nrql-mode-query-data/). For example, you can run a query like this:
262266

263267
```sql
264-
SELECT * FROM Log
268+
SELECT *
269+
FROM Log
265270
```
266271

267-
If no data appears after you enable our log management capabilities, follow our [standard log troubleshooting procedures](/docs/logs/log-management/troubleshooting/no-log-data-appears-ui/).
272+
If you don't get any data after you enable our log management capabilities, follow our standard log [troubleshooting procedures](/docs/logs/troubleshooting/no-log-data-appears-ui/).
268273

269274
## What's next? [#what-next]
270275

271-
Explore logging data across your platform with our [logs UI](/docs/logs/log-management/ui-data/use-logs-ui).
276+
Explore logging data across your platform with our [logs UI](/docs/logs/ui-data/use-logs-ui/).
272277

273278
* Get deeper visibility into both your application and your platform performance data by forwarding your logs with our [logs in context](/docs/logs/enable-log-management-new-relic/configure-logs-context/configure-logs-context-apm-agents/) capabilities.
274-
* Set up [alerts](/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-alert-conditions/).
279+
280+
* Set up [alerts](/docs/alerts/create-alert/create-alert-condition/alert-conditions/).
281+
275282
* [Query your data](/docs/query-your-data/explore-query-data/get-started/introduction-querying-new-relic-data/) and [create dashboards](/docs/query-your-data/explore-query-data/dashboards/introduction-dashboards/).
276283

277284
## Disable log forwarding [#disable]
278285

279-
To disable log forwarding capabilities, follow standard procedures in [Fluent Bit documentation](https://fluentbit.io/). You do not need to do anything else in New Relic.
286+
To disable log forwarding capabilities, follow standard procedures in [Fluent Bit documentation](https://fluentbit.io/). You don't need to do anything else in New Relic.

0 commit comments

Comments
 (0)