-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add OpenMetrics Metricbeat module #16596
Conversation
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.
I have added some thoughts, but some things are going to depend on how OpenMetrics is released at the end. Let me know what you think.
In any case I would be ok with merging this by now as an initial implementation.
"name": "collector", | ||
"period": 10000 | ||
}, | ||
"prometheus": { |
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.
Are we ok with using prometheus
in openmetrics fields?
In my opinion if we would be building prometheus/openmentrics support from scratch it could make sense to use openmetrics terminology, but given that we are already using prometheus, and most current implementations are prometheus-based, I am ok with using prometheus also for open metrics field names.
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.
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.
+1 on using openmetrics namespace, specially since we expect the protocol & output to change a bit
cac5096
to
6e7e283
Compare
Tried to make of Line 140 in fea2db3
, here is a diff:
@jsoriano @exekias would this be acceptable? I think this only affects |
If we use |
I see that this In my view it is quite robust. We report prometheus metrics under So I would consider it safe to change it since there are still |
@@ -1,7 +1,7 @@ | |||
[ | |||
{ | |||
"event": { | |||
"dataset": "ibmmq.qmgr", | |||
"dataset": "prometheus", |
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.
Oh wait, I don't like this change, I didn't fully get the implications of the namespace changes in prometheus collector.
It was intentional to have the name of the metricset in event.dataset
. This way we have all the prometheus metrics under prometheus.metrics
, but we can still use event.dataset
to know the source of the metrics.
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.
So I would consider it safe to change it since there are still
event.module
andmetricset.name
which can be also used.
Umm, this could be a breaking change if something or someone is using event.dataset
for this purpouse (I would have used this field myself, and I have probably recommended it in the past).
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
364d950
to
14b934c
Compare
hmm, I got your point @jsoriano. A workaround could be what I tried and implemented, to pass the "namespace" to the factory method and use within the metricset accordingly. Let me know what you think. ps: sorry for the force-push but I had to drop the commit that changed golden files. |
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, "too many open files" errors in CI are fixed in master.
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Merging this, since Libbeat test's(https://travis-ci.org/elastic/beats/jobs/658099652?utm_medium=notification&utm_source=github_status) are also failing on master. |
(cherry picked from commit 3b35d0b)
What does this PR do?
This PR adds OpenMetrics Metricbeat module as a light module on top of Prometheus collector metricset.
Why is it important?
OpenMetrics is an effort to standardize exposing metric data based on the Prometheus exposition format. This standalone module will provide an easy and out of the box way to collect metrics from endpoints that follow this format.
Checklist
How to test this PR locally
docker-compose up
. Then metrics should be exported athttp://localhost:9100/metrics
.And expect to see only events that match
node_filesystem_*
but also notnode_filesystem_device_*
and are notnode_filesystem_readonly
.3. Try to remove
^node_filesystem_readonly$
fromexclude
filters and see that this metric is included in events. One can try different combinations.Related issues