[Q&A] Put fields from a record to the index name in OpenSearch plugin #5045
-
What is a problem?Hello there! I use the next config for Fluentd:
Fluentd receives a JSON over HTTP from syslog-ng, then it sends received JSON record to an OpenSearch to an index which name depends on hostname (record[HOST_FROM]) and service (record[_journald][_SYSTEMD_UNIT]) Let's say Fluentd receives this record:
Fluentd receives this record and has to send to the index named application.service_application.domain.name -2025.07.30, but it tries to send the record to the index ${record[host_from]}${record[_journald][systemd_unit]}-2025.07.30! I've already tried to remove logstash_format and replace logstash_prefix with index_name, but it didn't work :( What do I wrong? Describe the configuration of FluentdNo response Describe the logs of FluentdThere are no logs, Fluentd sends records but to the wrong index Environment- Fluentd version: 1.16.9, in Docker
- TD Agent version:
- Fluent Package version:
- Docker image (tag): fluentd:v1.16.9-debian-1.1 (but I installed opensearch plugin)
- Operating system: Astra Linux (based on Debian)
- Kernel version: 6.1.124-1-generic |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok, I've figured out but I decided not to use service names in the index naming:
If you need to add more fields you probably should add more sections |
Beta Was this translation helpful? Give feedback.
Ok, I've figured out but I decided not to use service names in the index naming:
If you need to add …