How to get monitoring data?

  1. how to get monitoring data through the interface (API)? Can you provide some examples?

  2. Can the monitoring data be obtained by directly reading the database or middleware?

thanks

1 Like

Hi @xiangqianforth

Data can be fetch from the used victoriametrics time series
database.

1 Like

Thank you for your reply

1 Like
  1. Thank you very much. I have obtained the monitoring data of indicators such as CPU/memory through the API. Can query-analytics data be obtained using API? Can you provide some examples?

  2. Can you use Python or Java code to get data directly from Victoria-metrics-database?

1 Like
1 Like

I want to get the monitoring data of two indicators in a certain period of time. I used the following command to obtain the data of query-analysis, but an error was reported.
(1) command:
curl -s -X POST -d ’ {“period_start_from”: “2022-02-27T00:00:00Z”, “period_start_to”: “2022-02-27T01:00:00Z”, “order_by”: “num_queries”, “columns”: [“lock_time”, “sort_scan”], “group_by”: “server”} ’ http://username:passwd@my_server_ip/v0/qan/GetReport | jq
(2) return:
{error:internal server error, code:13, message:internal server error}

1 Like

please hep me,thanks!!!

1 Like