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

log_to_metrics: allow custom namespace and subsystem #9101

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

flobz
Copy link
Contributor

@flobz flobz commented Jul 17, 2024

This PR allows to change namespace and subsystem for log_to_metrics.


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

  • Example configuration file for the change
[SERVICE]
    Flush     1
    Daemon    off
    Log_Level info


[INPUT]
    Name               dummy
    Dummy              {"message":"dummy", "kubernetes":{"namespace_name": "default", "docker_id": "abc123", "pod_name": "pod1", "container_name": "mycontainer", "pod_id": "def456", "labels":{"app": "app1"}}, "duration": 20, "color": "red", "shape": "circle"}
    Tag                dummy.log
    Interval_sec               10


[FILTER]
    name               log_to_metrics
    match              dummy.log*
    tag                test_metric
    metric_mode        counter
    metric_name        count_all_dummy_messages
    metric_description This metric counts dummy messages
    metric_namespace my_ns
    metric_subsystem my_susbsystem

[OUTPUT]
    Name stdout
    Match test_metric

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • [N/A] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • [N/A] Backport to latest stable release.

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.

@flobz flobz force-pushed the feature/custom_ns_and_subsystem branch from 76d2c6e to 042357b Compare July 17, 2024 06:49
@flobz flobz force-pushed the feature/custom_ns_and_subsystem branch from 042357b to faf63bb Compare July 17, 2024 14:51
@flobz flobz force-pushed the feature/custom_ns_and_subsystem branch from faf63bb to 1b9f01d Compare July 17, 2024 18:55
Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
@edsiper
Copy link
Member

edsiper commented Jul 24, 2024

thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants