Remove node exporter from pmm-agent ( pmm2 )

Hi, is there any way to remove node exporter from pmm-agent. I have a lot of app that does the same as node exporter did. I only want pmm-agent use MySQL exporter to monitor MySQL service.
Best regards!

1 Like

Hi,
There are no official ways to disable a node_exporter. It’s added for monitoring during running pmm-client configuration procedure.
But you may set a fake path to node_exporter in the pmm configuration file. So it will not be start by pmm-agent.
Please notice that it’s required to stop pmm-agent service before changing the path. Otherwise pmm-agent wouldn’t be able to stop an already running node_exporter.


1 Like

Yes yes, thank you for the solution. <3

1 Like

Use swagger API:

# run on pmm-agent node

$ pmm-admin list --json | jq '.agent | .[] | select(.agent_type == "NODE_EXPORTER" and .status != "DONE" and .disabled != true) | .agent_id' | tr -d '"'
/agent_id/ffff-0xdeadbeef


$ curl -X 'POST' \
  -u admin:admin \
  'https://<pmm-server-address>/v1/inventory/Agents/ChangeNodeExporter' \
  -H 'accept: application/json' \
  -k \
  -H 'Content-Type: application/json' \
  -d '{
    "agent_id": "/agent_id/ffff-0xdeadbeef",
    "common": {
      "disable": true
    }
  }'
1 Like