Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out_syslog: Add nested key support. #2516

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pascapascapascapasca
Copy link

@pascapascapascapasca pascapascapascapasca commented Sep 1, 2020

Signed-off-by: Pascal Rivard [email protected]

Add nested key support in the out_syslog plugin. When a nested key separator is provided in the config, recursively iterate through map values inside the key-values provided by fluent-bit. Build a list of expanded keys with associated values, using the defined separator. Iterate through that list to find the defined syslog keys.

Addresses #2168


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

Documentation

] Documentation required for this feature

NOTE: Valgrind shows a leak, but it seems to have to do with this line, which was not modified in this PR. From what I see, this string is never freed.

syslog_conf.c: 167
ctx->sd_key[ctx->nsd] = flb_sds_create(prop->val);


Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

…_keys

Conflicts:
	plugins/out_syslog/syslog.c
	plugins/out_syslog/syslog_conf.c
	plugins/out_syslog/syslog_conf.h
@pascapascapascapasca
Copy link
Author

Hi,

I was just wondering if there a problem with this Pull Request? I can't see any error, except for Travis CI that failed for something not due to the changes, and I haven't got any news from the reviewers. Any feedback would be appreciated!

@github-actions
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Mar 24, 2021
@acastong
Copy link

This pull request should not be closed. It is frequent to have to work with nested keys when dealing with data that is in the ECS format. In the case where we want to send logs to multiple destinations, both Elasticsearch and syslog for backwards compatibility reason, we want to have this nested key support.

Is it possible to move a head with the review of this pull request?

@github-actions github-actions bot removed the Stale label Mar 25, 2021
@github-actions
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Apr 27, 2021
@acastong
Copy link

It is frequent to have to work with nested keys when dealing with data that is in the ECS format. In the case where we want to send logs to multiple destinations, both Elasticsearch and syslog for backwards compatibility reason, we want to have this nested key support.

Is it possible to move a head with the review of this pull request?

@github-actions github-actions bot removed the Stale label Apr 28, 2021
@aderumier
Copy link

Hi,
I really need this too to be able to use k8s nested labels

@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2021

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Jun 4, 2021
@aderumier
Copy link

still no news ?

@github-actions github-actions bot removed the Stale label Jun 5, 2021
@github-actions
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Jul 22, 2021
@acastong
Copy link

This PR is still relevant, @edsiper is there any chance to get a bit of cycles to look at it?

@github-actions github-actions bot removed the Stale label Jul 23, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2022

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Jan 4, 2022
@acastong
Copy link

This PR is still relevant, although after nearly 16 months I am not sure there is any hope this will ever be reviewed or merged...

@github-actions github-actions bot removed the Stale label Jan 14, 2022
@github-actions
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Apr 14, 2022
@acastong
Copy link

The PR is still relevant: we needed to write our own custom syslog plugin to circumvent the limitation but would like to be able to use the standard plugin to handle structures with nested keys.

@github-actions github-actions bot removed the Stale label Apr 15, 2022
@github-actions
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Jul 14, 2022
@acastong
Copy link

The PR is still relevant: we needed to write our own custom syslog plugin to circumvent the limitation but would like to be able to use the standard plugin to handle structures with nested keys.

@github-actions
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Oct 18, 2022
@acastong
Copy link

The PR is still relevant: we needed to write our own custom syslog plugin to circumvent the limitation but would like to be able to use the standard plugin to handle structures with nested keys.

@github-actions github-actions bot removed the Stale label Oct 23, 2022
@github-actions
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Jan 22, 2023
@acastong
Copy link

The PR is still relevant: we needed to write our own custom syslog plugin to circumvent the limitation but would prefer to be able to use the standard plugin to handle structures with nested keys.

@github-actions github-actions bot removed the Stale label Jan 25, 2023
@opethema
Copy link

any plans to merge this?

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label May 2, 2023
@acastong
Copy link

acastong commented May 4, 2023

The PR is still relevant: we needed to write our own custom syslog plugin to circumvent the limitation but would prefer to be able to use the standard plugin to handle structures with nested keys.

@leonardo-albertovich
Copy link
Collaborator

I think that maybe a better approach would be improving the current version to use the record accessor.

That way we wouldn't be adding task specific "duplicated" code but instead we'd be reusing the existing infrastructure.
If that change is made I'll vouch for it and merge it right away.

@github-actions github-actions bot removed the Stale label May 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants