You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pipeline/outputs/stackdriver.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@
2
2
3
3
The _Stackdriver_ output plugin lets you ingest your records into the [Google Cloud Stackdriver Logging](https://cloud.google.com/logging/) service.
4
4
5
-
Before getting started with the plugin configuration, make sure to obtain the [proper credentials](https://cloud.google.com/logging/docs/agent/logging/authorization#create-service-account) to get access to the service. For best results, use a common JSON credentials file that can be referenced by the Stackdriver plugin.
5
+
Before getting started with the plugin configuration, be sure to obtain the [proper credentials](https://cloud.google.com/logging/docs/agent/logging/authorization#create-service-account) to get access to the service. For best results, use a common JSON credentials file that can be referenced by the Stackdriver plugin.
6
6
7
7
## Configuration parameters
8
8
9
9
This plugin uses the following configuration parameters. For more details about Stackdriver-specific parameters, see the [Google Cloud `LogEntry` API documentation](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry).
10
10
11
11
| Key | Description | Default |
12
12
| --- | ----------- | ------- |
13
-
|`google_service_credentials`| Absolute path to a Google Cloud credentials JSON file | Value of environment variable `$GOOGLE_APPLICATION_CREDENTIALS`|
13
+
|`google_service_credentials`| Absolute path to a Google Cloud credentials JSON file.| Value of environment variable `$GOOGLE_APPLICATION_CREDENTIALS`|
14
14
|`service_account_email`| Account email associated with the service. Only available if no credentials file has been provided. | Value of environment variable `$SERVICE_ACCOUNT_EMAIL`|
15
15
|`service_account_secret`| Private key content associated with the service account. Only available if no credentials file has been provided. | Value of environment variable `$SERVICE_ACCOUNT_SECRET`|
16
16
|`metadata_server`| Prefix for a metadata server. | Value of environment variable `$METADATA_SERVER`, or `http://metadata.google.internal` if unset. |
@@ -148,7 +148,7 @@ The `project_id` resource label will always be set from the service credentials
148
148
149
149
### Use the `resource_labels` parameter
150
150
151
-
The `resource_labels` configuration parameter offers an alternative API for assigning the resource labels. To use, input a list of commaseparated strings specifying resource labels plain text assignments (`new=value`), mappings from an original field in the log entry to a destination field (`destination=$original`) and environment variable assignments (`new=${var}`).
151
+
The `resource_labels` configuration parameter offers an alternative API for assigning the resource labels. To use, input a list of comma-separated strings specifying resource labels plain text assignments (`new=value`), mappings from an original field in the log entry to a destination field (`destination=$original`) and environment variable assignments (`new=${var}`).
152
152
153
153
For instance, consider the following log entry:
154
154
@@ -245,7 +245,7 @@ pipeline:
245
245
{% endtab %}
246
246
{% endtabs %}
247
247
248
-
The `resource_labels` parameter also supports validation for required labels based on the input resource type. This allows Fluent Bit to check if all specified labels are present for a given configuration before runtime. If validation isn't currently supported for a resource type that you would like to use this API with, you can open a pull request for it. Adding validation for a new resource type involves specifying the resources associated with the type alongside the [required labels](https://github.com/fluent/fluent-bit/blob/master/plugins/out_stackdriver/stackdriver_resource_types.c#L27).
248
+
The `resource_labels` parameter also supports validation for required labels based on the input resource type. This allows Fluent Bit to check if all specified labels are present for a given configuration before runtime. If validation isn't supported for a resource type that you want to use this API with, open a pull request for it. Adding validation for a new resource type involves specifying the resources associated with the type alongside the [required labels](https://github.com/fluent/fluent-bit/blob/master/plugins/out_stackdriver/stackdriver_resource_types.c#L27).
249
249
250
250
## Log names
251
251
@@ -255,13 +255,13 @@ By default, the plugin will write to the following log name:
255
255
/projects/<project ID>/logs/<log tag>
256
256
```
257
257
258
-
You might be in a scenario where being more specific about the log name is important (for example [integration with Log Router rules](https://cloud.google.com/logging/docs/routing/overview) or [controlling cardinality of log based metrics](https://cloud.google.com/logging/docs/logs-based-metrics/troubleshooting#too-many-time-series)). You can control the log name directly on a per-log basis by using the [`logging.googleapis.com/logName` special field](https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/stackdriver_special_fields.md#log-entry-fields). You can configure a `log_name_key` if you'd like to use something different from `logging.googleapis.com/logName`. For example, if the `log_name_key` is set to `mylognamefield` will extract the log name from `mylognamefield` in the log.
258
+
You might be in a scenario where being more specific about the log name is important (for example,[integration with Log Router rules](https://cloud.google.com/logging/docs/routing/overview) or [controlling cardinality of log based metrics](https://cloud.google.com/logging/docs/logs-based-metrics/troubleshooting#too-many-time-series)). You can control the log name directly on a per-log basis by using the [`logging.googleapis.com/logName` special field](https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/stackdriver_special_fields.md#log-entry-fields). You can configure a `log_name_key` if you'd like to use something different from `logging.googleapis.com/logName`. For example, if the `log_name_key` is set to `mylognamefield` will extract the log name from `mylognamefield` in the log.
259
259
260
260
## Troubleshooting
261
261
262
262
### Upstream connection error
263
263
264
-
An upstream connection error means Fluent Bit wasn't able to reach Google services, the error looks like this:
264
+
An upstream connection error means Fluent Bit wasn't able to reach Google services. In that case, the error message looks like this:
265
265
266
266
```text
267
267
[2019/01/07 23:24:09] [error] [oauth2] could not get an upstream connection
0 commit comments