Question: can we query SigNoz to get metrics about...
# support
j
Question: can we query SigNoz to get metrics about a service that is running? • Docker container, running python program, instrumented with OpenTelemetry • program sends/creates a "heartbeat" that includes the version of the program and the latest measurement of how long it took to execute the main loop • many instances of this docker container running on different machines/cloud deployments We want to know, in a separate a process, not using SigNoz dashboard in browser: 1. How many docker containers are running our program 2. What the mean/median amount of time the main loop is requiring
p
@Jason Harrison
an we query SigNoz to get metrics about a service that is running?
Docker container, running python program, instrumented with OpenTelemetry
many instances of this docker container running on different machines/cloud deployments
For this, you have to first send data from your python program to SigNoz - are you sending the telemetry data to SigNoz currently? - This doc should be helpful https://signoz.io/docs/instrumentation/python/ YOU should be able to send from multiple containers to SigNoz instance
program sends/creates a "heartbeat" that includes the version of the program and the latest measurement of how long it took to execute the main loop
You can either send this as an event attribute or as a metric - I think manual instrumentation would be needed - https://opentelemetry.io/docs/instrumentation/python/manual/
We want to know, in a separate a process, not using SigNoz dashboard in browser:
1. How many docker containers are running our program
2. What the mean/median amount of time the main loop is requiring
Can you share more details on the use case here? Are you trying to use this data in another python process?
@Ankit Nayan do you have any more insights here?
j
We want to be able to scale our processors on EC2. We have our own implementation of a job queue that doesn't connect with the various AWS scaling systems.
We can currently query how many EC2 instances are running, and how many jobs are in the queue, but can't (right now) query how many other containers are running?
So being able to query SigNoz would allow us to make the scaling decisions and take action.
@Ankit Nayan suggestions? Can we query the SigNoz dashboard or metrics for reuse in other systems?
Obviously we could use something like selenium to extract information but that seems so so so wrong.
a
@Jason Harrison yes .... you can use the apis of query service in your workflows to automate scaling. The same APIs which are used by frontend can be used by any other system given the auth apis are also properly called
you can also create any custom metric using opentelemetry instrumentation in your application and use signoz's apis to query the metric and use it anywhere else in your system
It would be great to create an issue for this. If many people want similar solutions, we can create sdks of signoz that can be used to import in your application and use signoz as backend for any other purpose
p
you can use this link to create an issue
j
@Kelvin chu
Where is that documented?
Can you tell which component of the UI or query you want to call from another system? I can prepare language specific sample code to do that. Let me know the language you want to consume the API
j
@Ankit Nayan sorry for the delay, finally wrote up what I was thinking about: https://github.com/SigNoz/signoz/issues/1584
p
thanks @Jason Harrison
j
I think this is similar to what I wrote before, the question is whether we query a component of SigNoz or a query from the QueryService
Yes. Will the Query Service return averaged or statistically filtered data? Like 90% value, average, max, etc over a time range?
a
yes.. should be achievable using CH query in dashboards
j
Thanks!