-
Notifications
You must be signed in to change notification settings - Fork 16
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
Question: Help with adding a "State" metric #9
Comments
Why not use a gauge metric like, |
Thank you for the prompt reply Amit. We have tried to update the metric from the selenium script using Appreciate the help! |
Ah, good point about the different processes, that explains why you do not see it working. Is your Flask server only for exporting the metrics? If so and even if not, I can suggest you to use https://github.com/prometheus/statsd_exporter in the following fashion:
See https://rollout.io/blog/monitoring-your-synchronous-python-web-applications-using-prometheus/ for learning more about the statsd exporter approach. |
We switched over to using the statsd approach and have better results with that. We actually decided to switch to using a counter metric and will use a query to determine the state in grafana. The last issue we are facing seems to be a docker one.. We're researching it now, but perhaps you have some experience. Our flask app now has an endpoint, "raise_count" that is called from the selenium script when there is an exception. Problem seems to be in the Docker networking. Selenium script calls the webhook using this:
docker-compose.yml (simplified):
But we are getting a "connection refused" error. |
Why not push the statsd metric directly from selenium script? |
Hello Amitasha!
I hope it is okay that I am opening an issue here to ask for some help. We are using your example to create a healthcheck for a web login process. I have posted a question to stackoverflow around adding an Enum metric with a "looping" selenium webscraper script here
Would you by chance have the time to lend some advice on how to approach this? Modifying your example flask app here has been the easy part, it is the communication between the webscraper status and the middleware that is the difficult part.
Any advice would be great, thanks for creating this project!
The text was updated successfully, but these errors were encountered: