-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
CHT monitoring is trying to take <url>+/api/v2/monitoring?connected_user_interval=30 endpoint , some servers are giving data. Some are not responding even though they are up #8468
Comments
Can you please check that all URL's are correctly formatted and don't contain any additional characters? |
@dianabarsan {"version":{"app":"3.13.0","node":"v12.22.12","couchdb":"2.3.1"},"couchdb":{"medic":{"name":"###","update_sequence":###,"doc_count":###,"doc_del_count":##,"fragmentation":###},"sentinel":{"name":"####","update_sequence":36#####,"doc_count":1#####,"doc_del_count":#7,"fragmentation":2#####},"usersmeta":{"name":"####","update_sequence":##3,"doc_count":#####5,"doc_del_count":0,"fragmentation":####},"users":{"denied":0,"cleared":0,"muted":0,"duplicate":###}}}},"outbound_push":{"backlog":0},"feedback":{"count":###3},"conflict":{"count":####},"replication_limit":{"count":#33},"connected_users":{"count":2##}} such a json data . meanwhile when I hit servers that don't show up in my cht monitoring in the same URL ++ /api/v2/monitoring?connected_user_interval=30 it is just redirecting to the login page.I hope that's why my monitoring system is not being able to produce data even though the instances are up. |
I'm still suspecting the URLs you are using in your prometheus config are somehow malformed. Have you tested each one? |
@dianabarsan Yes I have tested each URL, while hitting all the URLs directly I'm able to get the login page also. |
Then the URLs are malformed somehow, because the monitoring API is not supposed to redirect to the login page. |
If would be helpful if you could share one of the URLs that are redirecting to login (you can obfuscate the host for example). |
@dianabarsan in the screenshot the first URL is the one that is giving the data, the next URL is another cht instance but when hit with monitoring API it redirects to login page |
Hi @vyshakssekhar |
@dianabarsan i hope now its uploaded properly |
Thanks for sharing @vyshakssekhar . What happens if you include valid basic authentication in that second request? Do you get correct monitoring output? |
@dianabarsan you mean to include basic authentication for login? |
Yes. so your url will be like: https://admin:password@hostname.com/api/v2/monitoring |
@dianabarsan need to check with the team, since these are production instances we don't have application-side credentials |
@vyshakssekhar How do you know these production instances are using the same CHT version then? |
Is it possible you're querying an instance that doesn't have |
but all these instances are using same medic os image and its related dependencies |
In the screenshot you shared, the first instance is not even using |
@dianabarsan I am puzzled with a question is it possible if an instance with medic-os image not to be configured with api/v2/monitoring if the infra team has used medic set up the infra using medic os repo. I am asking because we are a new team maintaining the infra and the old team who made the setup is not there in the organization currently. |
|
@dianabarsan yes , the instance for which the api/v1/monitoring endpoint working is having cht version 3.12+ but for rest im unable to check the app version of the instances without this endpoint api/v1/monitoring. |
Without authentication, I don't think there is an endpoint that will return app version. Do you have any instance for which api/v1/monitoring is not working? This endpoint was added in version 3.9. |
Tagging @garethbowen for further assistance (thanks Gareth!!) |
yes i have instance for which api/v1/monitoring is not working , in command line the docker process status shows it to medic os container of version 3.9.0 as i have attached above, while hitting the url with this endpoint it is redirecting to login page. |
@vyshakssekhar Don't get fooled by the As 3.9 has been unsupported for more than 2 years this is now impossible for us to replicate. If you share the URL with me privately (email gareth@medic.org) I can attempt to dig deeper, otherwise it's very difficult to figure out what's going on. Some things you can try...
|
I am using multiple cht instances and I have added all the servers to the CHT monitoring tools yml file , in the Grafana dashboard some servers are providing data , but some instance are not giving any data - even though they are up, we are not getting data
when closely examined I got to know that this is the endpoint that the Prometheus is trying to scrape data from /api/v2/monitoring?connected_user_interval=30 , when I checked with some server url+ the endpoint I'm getting JSON data , but some servers are redirecting to login page even though all the servers are using same cht image.
Help me through this to make sure all up servers are giving data to the monitoring.
The text was updated successfully, but these errors were encountered: