Skip to content
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

Additional metrics using flags not available #42

Open
devahariharan opened this issue Oct 13, 2023 · 2 comments
Open

Additional metrics using flags not available #42

devahariharan opened this issue Oct 13, 2023 · 2 comments
Labels
help wanted Extra attention is needed need-more-info

Comments

@devahariharan
Copy link

Hi,
I'm using the below command to start MySQL Router exporter, unable to find the metrics mentioned as flags except for metadata_status.

cmd: /usr/bin/mysqlrouter_exporter --url=http://localhost:8443/ --user=user --pass=pass -k --collect-interval=5 --collect.metadata.status --collect.route.connections.byte_from_server --collect.route.connections.byte_to_server --collect.route.connections.time_started --collect.route.connections.time_connected_to_server --collect.route.connections.time_last_sent_to_server --collect.route.connections.time_received_from_server

mysqlrouter_exporter version: 4.0.5
Please help if any wrong usage of command.

@rluisr
Copy link
Owner

rluisr commented Oct 15, 2023

There may be a bug in the REST API of the MySQL Router.
Even in my production environment, /api/20190715/routes/bootstrap_ro/connections returns

{"items":[]}

But for some reason, bootstrap_rw has a value:

{"items":[{"bytesFromServer":10236,"bytesToServer":2606,"sourceAddress":"192.168.20.123:50494","destinationAddress":"192.168.20.47:3306","timeStarted":"2023-10-15T09:07:57.355979Z","timeConnectedToServer":"2023-10-15T09:07:57.363335Z","timeLastSentToServer":"2023-10-15T09:59:24.421877Z","timeLastReceivedFromServer":"2023-10-15T09:59:24.421923Z"},{"bytesFromServer":1220,"bytesToServer":1445,"sourceAddress":"192.168.20.123:50496","destinationAddress":"192.168.20.47:3306","timeStarted":"2023-10-15T09:07:57.481898Z","timeConnectedToServer":"2023-10-15T09:07:57.483972Z","timeLastSentToServer":"2023-10-15T09:07:57.486481Z","timeLastReceivedFromServer":"2023-10-15T09:07:57.486519Z"},{"bytesFromServer":1209,"bytesToServer":1305,"sourceAddress":"192.168.20.123:50495","destinationAddress":"192.168.20.47:3306","timeStarted":"2023-10-15T09:07:57.420859Z","timeConnectedToServer":"2023-10-15T09:07:57.423219Z","timeLastSentToServer":"2023-10-15T09:07:57.426187Z","timeLastReceivedFromServer":"2023-10-15T09:07:57.426223Z"}]}

It appears that more research is needed to resolve this issue.

@rluisr rluisr added need-more-info bug Something isn't working help wanted Extra attention is needed and removed bug Something isn't working labels Oct 15, 2023
@shayancanonical
Copy link

Can confirm the symptoms that @rluisr noticed. Got empty items, and not even a second later, the same request yielded results

root@mysql-router-k8s-0:/# curl -k -u monitoring:<password> https://127.0.0.1:8443/api/20190715/routes/bootstrap_rw/connections                                                                      
{"items":[]}
root@mysql-router-k8s-0:/# curl -k -u monitoring:<password> https://127.0.0.1:8443/api/20190715/routes/bootstrap_rw/connections                                                          
{"items":[{"bytesFromServer":2080,"bytesToServer":340,"sourceAddress":"10.1.241.193:38974","destinationAddress":"10.1.241.239:3306","timeStarted":"2024-06-26T19:07:37.373009Z","timeLastSentToServer":"2024-06-26T...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed need-more-info
Projects
None yet
Development

No branches or pull requests

3 participants