Skip to content

Commit

Permalink
adds: simpler approach to Postgres pids
Browse files Browse the repository at this point in the history
  • Loading branch information
TalkingQuickly committed Mar 17, 2021
1 parent 2d925f3 commit eb97837
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions attributes/default.rb

This file was deleted.

6 changes: 3 additions & 3 deletions templates/default/postgres.conf.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Monitoring Postgres Service

check process postgresql with pidfile <%= node['monit_configs-tlq']['postgres']['pidfile'] %>
start program = "/usr/bin/systemctl start postgresql"
stop program = "/usr/bin/systemctl stop postgresql"
check process postgresql with pidfile /var/run/postgresql/<%= node['postgresql']['version'] %>-main.pid
start program = "/usr/bin/systemctl start postgresql@<%= node['postgresql']['version'] %>-main"
stop program = "/usr/bin/systemctl stop postgresql@<%= node['postgresql']['version'] %>-main"
if 15 restarts within 15 cycles then timeout
if failed host localhost port 5432 type TCP then restart
if failed host localhost port 5432 type TCP then alert

0 comments on commit eb97837

Please sign in to comment.