# Could not open required defaults file: /etc/nagios/mysql.cnf

**URL:** <https://forums.percona.com/t/could-not-open-required-defaults-file-etc-nagios-mysql-cnf/5151>\
**Category:** Percona Monitoring Plugins\
**Created:** [October 14, 2016, 10:13am UTC](https://forums.percona.com/t/could-not-open-required-defaults-file-etc-nagios-mysql-cnf/5151 "2016-10-14T10:13:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![evan](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/32.png) [@evan](https://forums.percona.com/u/evan)\
**Post date:** [October 14, 2016, 10:13am UTC](https://forums.percona.com/t/could-not-open-required-defaults-file-etc-nagios-mysql-cnf/5151/1 "2016-10-14T10:13:55Z")

</div>

My file is as follows:  
[client]  
user=myuser  
password=mypassword

We are using NRPE to monitor this on a remote host. Maybe my command definition is wrong?

Remote mysql server (nrep.cfg):  
command[check\_mysql\_replication\_running]=/usr/lib64/nagios/plugins/pmp-check-mysql-replication-running  
command[check\_mysql\_replication\_delay]=/usr/lib64/nagios/plugins/pmp-check-mysql-replication-delay

Nagios server (commands)  
define command {  
command\_name check-mysql-replication-running  
command\_line $USER1$/check\_nrpe -H $HOSTADDRESS$ -c $ARG1$  
}

define command {  
command\_name check-mysql-replication-delay  
command\_line $USER1$/check\_nrpe -H $HOSTADDRESS$ -c $ARG1$  
}

Nagios server (node)

define host{  
use my-template  
host\_name myhostname  
alias myhostname  
address 1.1.1.1  
}

define service{  
use generic-service  
host\_name myhostname  
service\_description mysql replication status  
check\_command check-mysql-replication-running!check\_mysql\_replication\_running  
}

define service{  
use generic-service  
host\_name myhostname  
service\_description mysql slave delay  
check\_command check-mysql-replication-delay!check\_mysql\_replication\_delay  
}
