# mongodb cacti monitoring script fails when db auth is enabled

**URL:** <https://forums.percona.com/t/mongodb-cacti-monitoring-script-fails-when-db-auth-is-enabled/6297>\
**Category:** Percona Monitoring Plugins\
**Created:** [April 12, 2018, 8:27pm UTC](https://forums.percona.com/t/mongodb-cacti-monitoring-script-fails-when-db-auth-is-enabled/6297 "2018-04-12T20:27:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rossd](https://avatars.discourse-cdn.com/v4/letter/r/977dab/32.png) [@rossd](https://forums.percona.com/u/rossd)\
**Post date:** [April 12, 2018, 8:27pm UTC](https://forums.percona.com/t/mongodb-cacti-monitoring-script-fails-when-db-auth-is-enabled/6297/1 "2018-04-12T20:27:43Z")

</div>

Hi, my mongodb has authentication enabled and it seems that the  
db.\_adminCommand({serverStatus : 1}); in the script is designed to be run unauthenticated.  
{ “ok” : 0, “errmsg” : “not authorized on admin to execute command { serverStatus: 1.0 }”, “code” : 13 } Can anyone suggest how this monitoring is supposed to work when a mongodb that has authentication enabled?

Thanks

R
