https://signoz.io logo
#support
Title
# support
j

Jason Harrison

09/12/2022, 6:58 PM
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

Pranay

09/12/2022, 10:12 PM
@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

Jason Harrison

09/12/2022, 10:23 PM
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

Ankit Nayan

09/14/2022, 5:12 PM
@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

Pranay

09/14/2022, 5:19 PM
you can use this link to create an issue
j

Jason Harrison

09/14/2022, 6:22 PM
@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

Jason Harrison

09/20/2022, 8:30 PM
@Ankit Nayan sorry for the delay, finally wrote up what I was thinking about: https://github.com/SigNoz/signoz/issues/1584
p

Pranay

09/20/2022, 8:31 PM
thanks @Jason Harrison
j

Jason Harrison

09/20/2022, 8:32 PM
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

Ankit Nayan

09/21/2022, 8:40 AM
yes.. should be achievable using CH query in dashboards
j

Jason Harrison

09/26/2022, 7:58 PM
Thanks!
3 Views