-
Notifications
You must be signed in to change notification settings - Fork 465
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
[O11y][Prometheus Input] Add system test cases #6490
Conversation
@@ -0,0 +1,4 @@ | |||
vars: | |||
hosts: | |||
- http://{{Hostname}}:{{Port}} |
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.
We are not collecting data of a specific service having a Prometheus end point here ?
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.
@ishleenk17 Do you mean like setting up any service such as WebSphere Application Server, IBM MQ, etc. and then collect the metrics using 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.
That's right.
"job": "prometheus", | ||
"slice": "queue_time" | ||
}, | ||
"prometheus_engine_query_duration_seconds_count": { |
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.
Why only two metrics show up the sample event? Does not prometheues :9090/metrics has many more 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.
@lalit-satapathy : That's why I have asked @aliabbas-elastic to have a service running and then run system test. Otherwise by default if we just bringup a Prometheus Input, we get these default metrics like job, labels only.
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.
Assuming this runs the prom/prometheus image and loads the metrics from :9090/metrics which is fine IMO. I don't know why all other metrics are not showing up in sample event.
Example:
prometheus_target*_ 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.
Why only two metrics show up the sample event? Does not prometheues :9090/metrics has many more metrics?
Actually I am getting all the metrics but they are in different response. Prometheus logically groups the metrics under different labels and Prometheus Input ingests these groups in independent documents. But in sample_event.json
only one document can be displayed.
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.
Yes looks like prometheus package is creating separate event for each of the Prometheus metric, looks like 1 metric per document.
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.
@lalit-satapathy @aliabbas-elastic
I don't think it's 1 metric per document.
Please refer to the screenshot in this PR.
Here I have run Prometheus input for the Influxdb service.
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.
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 looks like grouping is happening by labels.
How about the metrics which don't have labels. How do those show up ?
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.
Those will be received in one single document under two labels prometheus.labels.instance
and prometheus.labels.job
. Please refer to the sample_event.json
file.
… into prometheus_input_system_test
Is there any risk in the linked docker image going away and breaking our tests in future? otherwise LGTM. |
No I don't think so there will be any risk as such as it an official image of the WebSphere Application Server. |
Package prometheus_input - 0.1.3 containing this change is available at https://epr.elastic.co/search?package=prometheus_input |
What does this PR do?
Checklist
changelog.yml
file.How to test this PR locally
Related issues