Hi,
I am in the process of remotely monitoring the PMM2 agents for postgres through API call to PMM2 Server.
I could get the service_id for the Postgres service and the API call to /v1/inventory/Agents/Get. But the API call returns the response properly, but the status is always “RUNNING” even though I stopped the agent manually on the host.
Is there anyway , I can monitor the status of postgres_exporter and qan_postgresql_pgstatements_agent status remotely without logging into the individual node.
For example
{
"postgres_exporter": [
{
"agent_id": "/agent_id/92313ac0-74a8-4f8d-8874-c5c5dcae6cfc",
"listen_port": 50226,
"pmm_agent_id": "/agent_id/10ec276b-86a2-4afd-aabf-ed7cd4bfcb40",
"service_id": "/service_id/83412f60-772f-4bc2-93d8-2644ae8c3e4d",
"status": "RUNNING",
"tls": true,
"tls_skip_verify": true,
"username": "pmm_user"
}
],
"qan_postgresql_pgstatements_agent": [
{
"agent_id": "/agent_id/dc7b810a-1c0b-4844-b952-13fcd862af44",
"pmm_agent_id": "/agent_id/10ec276b-86a2-4afd-aabf-ed7cd4bfcb40",
"service_id": "/service_id/83412f60-772f-4bc2-93d8-2644ae8c3e4d",
"status": "RUNNING",
"tls": true,
"tls_skip_verify": true,
"username": "pmm_user"
}
]
}
Thanks
Raj