Skip to content

Commit

Permalink
Merge pull request #5 from TalkingQuickly/feature/2021-upgrade
Browse files Browse the repository at this point in the history
Feature/2021 upgrade
  • Loading branch information
TalkingQuickly committed Mar 18, 2021
2 parents c10ee52 + eb97837 commit 2bf2556
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 62 deletions.
3 changes: 0 additions & 3 deletions attributes/default.rb

This file was deleted.

12 changes: 6 additions & 6 deletions metadata.rb
Expand Up @@ -2,12 +2,12 @@
maintainer "Ben Dixon"
maintainer_email "ben@talkingquickly.co.uk"
description "Monit configs for server components"
version "0.1.2"
version "1.0.0"

recipe "monit_configs-tlq::memcached", "Monit config for memcached"
recipe "monit_configs-tlq::mongo", "Monit config for mongodb"
recipe "monit_configs-tlq::mysql-server", "Monit config for mysql server"
recipe "monit_configs-tlq::nginx", "Monit config for nginx"
recipe "monit_configs-tlq::redis-server", "Monit config for redis server"
recipe "monit_configs-tlq::memcached", "Monit config for Memcached"
recipe "monit_configs-tlq::postgres", "Monit config for Postgres"
recipe "monit_configs-tlq::nginx", "Monit config for NGINX"
recipe "monit_configs-tlq::redis-server", "Monit config for Redis"
recipe "monit_configs-tlq::system", "Monit config for system memory, disk and cpu usage"

supports "ubuntu"
13 changes: 0 additions & 13 deletions recipes/mongo.rb

This file was deleted.

13 changes: 0 additions & 13 deletions recipes/mysql-server.rb

This file was deleted.

7 changes: 3 additions & 4 deletions templates/default/memcached.conf.erb
@@ -1,7 +1,6 @@
check process memcached
with pidfile /var/run/memcached.pid
check process memcached with pidfile /var/run/memcached/memcached.pid
group memcache
start program = "/etc/init.d/memcached start"
stop program = "/etc/init.d/memcached stop"
start program = "/usr/bin/systemctl start memcached"
stop program = "/usr/bin/systemctl stop memcached"
if failed host 127.0.0.1 port 11211 protocol memcache then restart
if 3 restarts within 6 cycles then timeout
8 changes: 0 additions & 8 deletions templates/default/mongo.conf.erb

This file was deleted.

8 changes: 0 additions & 8 deletions templates/default/mysql-server.conf.erb

This file was deleted.

4 changes: 2 additions & 2 deletions templates/default/nginx.conf.erb
@@ -1,7 +1,7 @@
#Monitoring Nginx Service

check process nginx with pidfile /var/run/nginx.pid
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
start program = "/usr/bin/systemctl start nginx"
stop program = "/usr/bin/systemctl stop nginx"
if failed host 127.0.0.1 port 80 then restart
if 15 restarts within 15 cycles then timeout
8 changes: 5 additions & 3 deletions templates/default/postgres.conf.erb
@@ -1,6 +1,8 @@
#Monitoring Postgres Service

check process postgresql with pidfile <%= node['monit_configs-tlq']['postgres']['pidfile'] %>
start program = "/etc/init.d/postgresql start"
stop program = "/etc/init.d/postgresql stop"
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
4 changes: 2 additions & 2 deletions templates/default/redis-server.conf.erb
@@ -1,7 +1,7 @@
#Monitoring redis
check process redis with pidfile /var/run/redis/redis-server.pid
group database
start program = "/etc/init.d/redis-server start"
stop program = "/etc/init.d/redis-server stop"
start program = "/usr/bin/systemctl start redis-server"
stop program = "/usr/bin/systemctl stop redis-server"
if failed host 127.0.0.1 port 6379 then restart
if 15 restarts within 15 cycles then timeout
3 changes: 3 additions & 0 deletions templates/default/system.conf.erb
Expand Up @@ -5,3 +5,6 @@ check system localhost
if cpu usage (user) > 70% for 5 cycles then alert
if cpu usage (system) > 30% for 5 cycles then alert
if cpu usage (wait) > 20% for 5 cycles then alert

check device rootfs with path /
if SPACE usage > 80% then alert

0 comments on commit 2bf2556

Please sign in to comment.