diff --git a/defaults/main.yml b/defaults/main.yml index 04a7a35..d2aa138 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -24,7 +24,7 @@ nrpe_smtp_host: localhost nrpe_eth_warning: '12M' nrpe_eth_critical: '15M' -nrpe_postgresql_host: locahost +nrpe_postgresql_host: localhost nrpe_postgresql_port: 5432 nrpe_postgresql_user: nagios nrpe_postgresql_password: changeme_ diff --git a/templates/nrpe.j2 b/templates/nrpe.j2 index 4cb6386..044ee24 100644 --- a/templates/nrpe.j2 +++ b/templates/nrpe.j2 @@ -37,7 +37,7 @@ command[check_mysql_longqueries]=/usr/lib/nagios/plugins/check_mysql_longqueries {% if nrpe_postgresql is defined %} # postgresql -command[check_pgsql_port]=/usr/lib/nagios/plugins/check_tcp -p {{ nrpe_postgresql_port }} +command[check_pgsql_port]=/usr/lib/nagios/plugins/check_tcp -p {{ nrpe_postgresql_port }} -H {{ nrpe_postgresql_host }} command[check_proc_postgresql]=/usr/lib/nagios/plugins/check_systemd_service postgresql command[check_pgsql_connection]=/usr/lib/nagios/plugins/check_postgresql -H {{ nrpe_postgresql_host }} -p {{ nrpe_postgresql_port }} --dbuser={{ nrpe_postgresql_user }} --dbpass={{ nrpe_postgresql_password }} --action=connection command[check_pgsql_backends]=/usr/lib/nagios/plugins/check_postgresql -H {{ nrpe_postgresql_host }} -p {{ nrpe_postgresql_port }} --dbuser={{ nrpe_postgresql_user }} --dbpass={{ nrpe_postgresql_password }} --action=backends -w {{ nrpe_postgresql_backend_warning }} -c {{ nrpe_postgresql_backend_critical }}