Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Host logs does not currently support gateway mode. If running the agent in gateway mode, the exporters section of the logs/host pipeline will be set to splunk_hec/platform_logs. In gateway mode, the agent does not have this exporter configured and it is only present on the collector. Therefore, the exporter must be set to otlp so that logs are sent to the collector.
This is the same approach used for main logs pipeline on lines 637 - 647 - if running in gateway mode use the otlp exporter, otherwise use the splunk_hec/o11y or splunk_hec/platform_logs exporters depending on configuration.
n.b. the triple
{{- end }}
at the end of this diff may seem confusing. I think the first{{-end }}
on line 678 closes the if statement in 676, but prior to this change the second{{-end }}
on line 679 closes the if statement on line 649 and is indented wrongly? With this change, it's now the third{{-end }}
on line 680 that closes the if statement on line 649 and is still indented wrongly. As i'm essentially just adding a new if/else that needs closing, I have not fixed the indentation of the "final" if statement. If anyone else thinks this statement is wrongly indented, I can add another commit to fix it.