mongodb_exporter: mongodb_up metric is not reflecting correctly

I am running the pmm-agent in the kubernetes cluster as a stateful, restarted the MongoDB pod and the mongodb_up is not set to zero

pmm-agent and pmm-server version: 2.22.0

At the MongoDB pod restart the below is the log that I get

INFO[2021-09-27T13:16:13.057+00:00] time="2021-09-27T13:16:13Z" level=error msg="error while checking mongodb connection: server selection error: context canceled, current topology: { Type: Single, Servers: [{ Addr: mongodb-cs-cfg-0.mongodb-cs-cfg.dev.svc.cluster.local:27019, Type: Unknown, Average RTT: 0, Last error: connection() error occured during connection handshake: dial tcp: lookup mongodb-cs-cfg-0.mongodb-cs-cfg.dev.svc.cluster.local on 1: no such host }, ] }. mongo_up is set to 0"  agentID=/agent_id/3466d059-8282-48f4-8c31-dc91d17ee1c7 component=agent-process type=mongodb_exporter
INFO[2021-09-27T13:16:13.058+00:00] time="2021-09-27T13:16:13Z" level=error msg="error while checking mongodb connection: server selection error: context canceled, current topology: { Type: Single, Servers: [{ Addr: mongodb-cs-cfg-0.mongodb-cs-cfg.dev.svc.cluster.local:27019, Type: Unknown, Average RTT: 0, Last error: connection() error occured during connection handshake: dial tcp: lookup mongodb-cs-cfg-0.mongodb-cs-cfg.dev.svc.cluster.local on : no such host }, ] }. mongo_up is set to 0"  agentID=/agent_id/3466d059-8282-48f4-8c31-dc91d17ee1c7 component=agent-process type=mongodb_exporter
INFO[2021-09-27T13:16:23.058+00:00] time="2021-09-27T13:16:23Z" level=error msg="error while checking mongodb connection: server selection error: context canceled, current topology: { Type: Single, Servers: [{ Addr: mongodb-cs-cfg-0.mongodb-cs-cfg.dev.svc.cluster.local:27019, Type: Unknown, Average RTT: 0, Last error: connection() error occured during connection handshake: dial tcp: lookup mongodb-cs-cfg-0.mongodb-cs-cfg.dev.svc.cluster.local on : no such host }, ] }. mongo_up is set to 0"  agentID=/agent_id/3466d059-8282-48f4-8c31-dc91d17ee1c7 component=agent-process type=mongodb_exporter

Logs say that the mongo_up is set to 0. But it is not set. It shows as If the metrics are not scrapped.

Output of pmm-admin status

bash-4.2$ pmm-agent status
pmm-agent: error: unexpected status, try --help
bash-4.2$ pmm-admin status
Agent ID: /agent_id/04a8a37b-1516-4ec3-8cb8-fd43ab5b2544
Node ID : /node_id/842ea103-f249-48ff-9d26-d41be5d41a38

PMM Server:
	URL    : https://pmm-server-dev-service.monitor.svc.cluster.local:443/
	Version: 2.22.0

PMM Client:
	Connected        : true
	Time drift       : 111.474µs
	Latency          : 368.186µs
	pmm-admin version: 2.22.0
	pmm-agent version: 2.22.0

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 2
  • Comments: 36 (16 by maintainers)

Most upvoted comments

yes, should be later in 2.23.0. just for testing purpose: perconalab/pmm-client:2.23.0-rc3108