-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
multi-target and custom queries #32741
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Can you give more information on what (Also, if you're interested in getting some help debugging your problem of only receiving one set of metrics, please include your full configuration 👍 ) |
@crobert-1 - thanks for replying. First issue about custom queries: I want to be able to create metrics using my own queries (you know how creative DBAs could be). See for eg https://github.com/iamseth/oracledb_exporter or https://github.com/free/sql_exporter. I see sqlqueryreceiver uses this principle, I will also give it a try but then ... what is the purpose of this oracledb receiver? Second problem: I was able to fix it by enabling the resource_to_telemetry_conversion on prometheus exporter. I'm only interested now if queries towards these multiple targets are actually performed in paralel. |
Thanks @lucian-vanghele, the sqlquery receiver would definitely be the better fit here for custom queries. I believe you could use it with the Oracle DB receiver to gather all the metrics you're looking for. There is overlap between the sqlquery receiver and most (if not all) of the other SQL receivers. The benefit of the dedicated receivers is the ability to simply enable/disable metrics, without having to worry about underlying queries. There's more flexibility with the sqlquery receiver, but then it's up to the user to figure out how to query the backend DB properly, what format and naming scheme the metrics should have, etc. |
@crobert-1 - I believe most, if not all, of the Oracle users (administrators actually) would like to have full control on these queries. So, I'm not sure how many will see the benefit you mentioned. |
That's fair! You're welcome to try out the SQL query receiver then and let us know if that works for your use case. Also, if you have any specific metrics or queries that would be especially helpful, you'd be welcome to request them to be added to the oracle DB receiver 👍
My apologies! It's available but for some reason we forgot to document it properly. I've submitted a PR to add it to the README. Thanks for bringing this up! |
**Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> These options are available via the receiver's dependency on `scraperhelper.ControllerConfig`, but weren't included in the README. **Link to tracking Issue:** <Issue number if applicable> [Brought up here](#32741 (comment))
I already tested sqlquery receiver, it works ok for now. However, I don't see the instance.name attribute (as for oracledb receiver) so I had to add it as a static attribute for each metric in order to be able to distinguish between timeseries related to different oracle instances. Also, I don;t find what is the timeout setting as some queries can take several seconds. I assume all receivers are executed parallel each in its own thread (as there is this collection_interval setting), right? |
The timeout setting is disabled by default, so unless you've set it, it shouldn't impact any functionality here. Yes, all receivers are executed in parallel, so the collection interval for the receiver has no impact on other receivers, and other receivers' collection intervals won't impact the oracle DB receiver. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Component(s)
receiver/oracledb
Is your feature request related to a problem? Please describe.
I want to be able to use use custom queries against multiple targets. having hardcoded queries is not the best ideas, sometimes there are differences between oracle versions.
I tried to add 2 receivers towards 2 different targets, I only received one set of metrics not even sure for which db.
Describe the solution you'd like
whatever solves the problem is better than current way.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: