]>
Commit | Line | Data |
---|---|---|
d8f933bd IB |
1 | class profile::monitoring::commands inherits profile::monitoring { |
2 | ensure_packages(["monitoring-plugins"]) | |
3 | ||
4 | file { "/etc/naemon/monitoring-plugins": | |
5 | ensure => "directory", | |
6 | owner => "naemon", | |
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", | |
15 | mode => "0700", | |
16 | source => "puppet:///modules/profile/monitoring/check_command", | |
17 | } | |
18 | ||
19 | file { "/etc/naemon/monitoring-plugins/check_md_raid": | |
20 | ensure => "present", | |
21 | owner => "naemon", | |
22 | group => "naemon", | |
23 | mode => "0700", | |
24 | source => "puppet:///modules/profile/monitoring/check_md_raid", | |
25 | } | |
26 | ||
27 | Nagios_command { | |
28 | ensure => "present", | |
29 | owner => "naemon", | |
30 | group => "naemon", | |
31 | target => "/etc/naemon/objects.cfg", | |
32 | notify => Service["naemon"], | |
33 | before => Service["naemon"], | |
69624636 | 34 | require => File["/etc/naemon"], |
d8f933bd IB |
35 | } |
36 | ||
37 | nagios_command { | |
38 | "check-host-alive": | |
39 | command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5'; | |
40 | "check_local_disk": | |
41 | command_line => '$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$'; | |
42 | "check_local_procs": | |
43 | command_line => '$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$'; | |
44 | "check_local_load": | |
45 | command_line => '$USER1$/check_load -w $ARG1$ -c $ARG2$'; | |
46 | "check_local_swap": | |
47 | command_line => '$USER1$/check_swap -n ok -w $ARG1$ -c $ARG2$'; | |
48 | "check_ntp": | |
49 | command_line => '$USER1$/check_ntp_time -H 0.arch.pool.ntp.org'; | |
50 | "check_md_raid": | |
51 | command_line => '$USER2$/check_md_raid'; | |
52 | "check_command_output": | |
53 | command_line => '$USER2$/check_command -c "$ARG1$" -o "$ARG2$" $ARG3$', | |
54 | require => File["/etc/naemon/monitoring-plugins/check_command"]; | |
55 | } | |
56 | ||
57 | unless empty($naemon_url) { | |
58 | nagios_command { | |
59 | "notify-master": | |
60 | command_line => '/etc/naemon/send_nrdp.sh -H "$HOSTADDRESS$" -s "$SERVICEDESC$" -S "$SERVICESTATEID$" -o "$SERVICEOUTPUT$"', | |
61 | require => File["/etc/naemon/send_nrdp.sh"]; | |
62 | } | |
63 | } | |
64 | } |