-
Notifications
You must be signed in to change notification settings - Fork 468
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
metrics-probe: add new parser which generates stats counters #4318
Conversation
No news file has been detected. Please write one, if applicable. |
4132a5a
to
ca0884a
Compare
Build FAILURE |
@kira-syslogng retest this please |
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
ca0884a
to
0f3fa59
Compare
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
0f3fa59
to
6721749
Compare
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
6721749
to
024bd1b
Compare
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
024bd1b
to
f71a744
Compare
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
f71a744
to
3949620
Compare
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
3949620
to
b4ce059
Compare
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
b4ce059
to
84e20b8
Compare
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
84e20b8
to
ec70003
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great :)
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
ec70003
to
0a10951
Compare
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
0a10951
to
c07e011
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
c07e011
to
ae08f3a
Compare
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
ae08f3a
to
0f4841f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻👍🏻
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
0f4841f
to
7d4aa53
Compare
As single stats clusters always store only one counter, we can always pinpoint that. Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
This can be useful for plugins, which implement (de)initializable Thread Local Storage variables. Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
This kind of parser counts messages passing through, based on the metadata of each message. It creates labeled stats counters based on the fields of the message. Both the key and labels can be set in the config, the values of the labels can be templated. This commit creates the skeleton for this parser, the implementation will be done in the following commits. Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
This will be useful for storing and formatting the label templates set in the config. Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Why do we need to limit the number of labels? We need allocated memory for the formatted labels, so we can create a `StatsClusterKey` from them. We could store a buffer for them in the class, but that would make it stateful, which means we need to lock it in the `process()` function Alternatively we could `malloc()` it in each `process()` call, but it is costly. If the number of labels is limited, we can allocate them on the stack in the `process()` function, which means we save a per message `malloc()` and manage to keep the parser stateless. The downside is that we put a limit on it, but I don't think that having more than 32 labels is sensible. Everything mentioned in this commit message will become cleaner in the next commits, where the labels get used. Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
7d4aa53
to
4b9cb8d
Compare
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
This kind of parser counts messages passing through, based on the metadata of each message. It creates labeled stats counters based on the fields of the message. Both the key and labels can be set in the config, the values of the labels can be templated.
Both the key and labels can be set in the config, the values of the labels can be templated. E.g.:
With this config, it creates counters like these:
The minimal config creates counters with the key
syslogng_classified_events_total
and labelsapp
,host
,program
andsource
. E.g.:With this config, it creates counters like these:
Depends on #4325
Signed-off-by: Attila Szakacs szakacs.attila96@gmail.com