pg - add host to check port

This commit is contained in:
Ludovic Cartier
2025-11-14 14:54:20 +01:00
parent f4e204b199
commit 9941f4644f
2 changed files with 2 additions and 2 deletions

View File

@@ -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_

View File

@@ -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 }}