Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
lib
README.md
main.go

README.md

mackerel-plugin-mongodb

MongoDB custom metrics plugin for mackerel.io agent.

Synopsis

mackerel-plugin-mongodb [-host=<host>] [-port=<port>] [-username=<username>] [-password=<password>] [-tempfile=<tempfile>] [-source=<authenticationDatabase>]

Example of mackerel-agent.conf

[plugin.metrics.mongodb]
command = "/path/to/mackerel-plugin-mongodb"

Add Role

newer mongodb requre clusterMonitor role when executed db.serverStatus() command.

so add role clusterMonitor to reporter.

db.grantRolesToUser(
  "user_id",
  [
  { role: "clusterMonitor", db:"admin"}
  ]
 );

see https://dba.stackexchange.com/questions/121832/db-serverstatus-got-not-authorized-on-admin-to-execute-command

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.