aboutsummaryrefslogtreecommitdiff
path: root/modules/profile/manifests/monitoring/commands.pp
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-07-08 21:51:30 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-07-10 10:26:39 +0200
commitb5305b5cad5cbb0a2c072b29f2d4dc05126c39d4 (patch)
tree8fb1844be8b9e68d62ee2ede54c1bb39d27d4c30 /modules/profile/manifests/monitoring/commands.pp
parent6962463657db999c33f1aabe60e0567be218918d (diff)
downloadPuppet-b5305b5cad5cbb0a2c072b29f2d4dc05126c39d4.tar.gz
Puppet-b5305b5cad5cbb0a2c072b29f2d4dc05126c39d4.tar.zst
Puppet-b5305b5cad5cbb0a2c072b29f2d4dc05126c39d4.zip
Add postgresql monitoring
Diffstat (limited to 'modules/profile/manifests/monitoring/commands.pp')
-rw-r--r--modules/profile/manifests/monitoring/commands.pp40
1 files changed, 23 insertions, 17 deletions
diff --git a/modules/profile/manifests/monitoring/commands.pp b/modules/profile/manifests/monitoring/commands.pp
index a25f7b3..4ccc816 100644
--- a/modules/profile/manifests/monitoring/commands.pp
+++ b/modules/profile/manifests/monitoring/commands.pp
@@ -3,25 +3,24 @@ class profile::monitoring::commands inherits profile::monitoring {
3 3
4 file { "/etc/naemon/monitoring-plugins": 4 file { "/etc/naemon/monitoring-plugins":
5 ensure => "directory", 5 ensure => "directory",
6 owner => "naemon", 6 owner => "root",
7 group => "naemon",
8 mode => "0700",
9 }
10
11 file { "/etc/naemon/monitoring-plugins/check_command":
12 ensure => "present",
13 owner => "naemon",
14 group => "naemon", 7 group => "naemon",
15 mode => "0700", 8 mode => "0755",
16 source => "puppet:///modules/profile/monitoring/check_command",
17 } 9 }
18 10
19 file { "/etc/naemon/monitoring-plugins/check_md_raid": 11 [
20 ensure => "present", 12 "check_command",
21 owner => "naemon", 13 "check_md_raid",
22 group => "naemon", 14 "check_postgres_replication",
23 mode => "0700", 15 "check_last_file_date",
24 source => "puppet:///modules/profile/monitoring/check_md_raid", 16 ].each |$file| {
17 file { "/etc/naemon/monitoring-plugins/$file":
18 ensure => "present",
19 owner => "root",
20 group => "naemon",
21 mode => "0755",
22 source => "puppet:///modules/profile/monitoring/$file",
23 }
25 } 24 }
26 25
27 Nagios_command { 26 Nagios_command {
@@ -48,10 +47,17 @@ class profile::monitoring::commands inherits profile::monitoring {
48 "check_ntp": 47 "check_ntp":
49 command_line => '$USER1$/check_ntp_time -H 0.arch.pool.ntp.org'; 48 command_line => '$USER1$/check_ntp_time -H 0.arch.pool.ntp.org';
50 "check_md_raid": 49 "check_md_raid":
51 command_line => '$USER2$/check_md_raid'; 50 command_line => '$USER2$/check_md_raid',
51 require => File["/etc/naemon/monitoring-plugins/check_md_raid"];
52 "check_command_output": 52 "check_command_output":
53 command_line => '$USER2$/check_command -c "$ARG1$" -o "$ARG2$" $ARG3$', 53 command_line => '$USER2$/check_command -c "$ARG1$" -o "$ARG2$" $ARG3$',
54 require => File["/etc/naemon/monitoring-plugins/check_command"]; 54 require => File["/etc/naemon/monitoring-plugins/check_command"];
55 "check_postgresql_replication":
56 command_line => '/usr/bin/sudo -u postgres $USER2$/check_postgres_replication "$ARG1$" "$ARG2$" "$ARG3$"',
57 require => File["/etc/naemon/monitoring-plugins/check_postgres_replication"];
58 "check_last_file_date":
59 command_line => '$USER2$/check_last_file_date "$ARG1$" "$ARG2$" "$ARG3$"',
60 require => File["/etc/naemon/monitoring-plugins/check_last_file_date"],
55 } 61 }
56 62
57 unless empty($naemon_url) { 63 unless empty($naemon_url) {