diff options
Diffstat (limited to 'personal_infra/puppet/site/pg.h1.int.pdp7.net.pp')
| -rw-r--r-- | personal_infra/puppet/site/pg.h1.int.pdp7.net.pp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/personal_infra/puppet/site/pg.h1.int.pdp7.net.pp b/personal_infra/puppet/site/pg.h1.int.pdp7.net.pp index c61a20d1..720f7f1a 100644 --- a/personal_infra/puppet/site/pg.h1.int.pdp7.net.pp +++ b/personal_infra/puppet/site/pg.h1.int.pdp7.net.pp @@ -7,6 +7,7 @@ node 'pg.h1.int.pdp7.net' { host weight k8s_prod k8s-prod.h1.int.pdp7.net trust host weight grafana grafana.h2.int.pdp7.net trust host weight grafana grafana.h1.int.pdp7.net trust + host weight nagios nagios.h1.int.pdp7.net trust host miniflux miniflux miniflux.h1.int.pdp7.net trust host nextcloud nextcloud nextcloud.h1.int.pdp7.net trust | EOT @@ -14,4 +15,27 @@ node 'pg.h1.int.pdp7.net' { } package {'postgresql15-contrib':} # hstore for miniflux + + nagios_service {'medication': + use => 'generic-service', + service_description => 'medication', + host_name => 'pg.h1.int.pdp7.net', + check_command => 'check_medication', + require => Package['nagios'], + notify => Service['nagios'], + owner => 'nagios', + } + + service {'nagios':} + package {'nagios': + ensure => absent, + } + + nagios_command {'check_medication': + command_name => 'check_medication', + command_line => '/usr/lib64/nagios/plugins/check_pgsql -H $HOSTADDRESS$ -l nagios -d weight -q "select extract(epoch from now() - max(taken_at)) / 60 / 60 from weight.pressure_medication" -W 24 -C 25', + require => Package['nagios'], + notify => Service['nagios'], + owner => 'nagios', + } } |
