OLD | NEW |
1 class nagios::client($server_address) { | 1 class nagios::client($server_address) { |
2 | 2 |
3 ensure_packages([ | 3 ensure_packages([ |
4 'nagios-nrpe-server', | 4 'nagios-nrpe-server', |
5 'sudo', | 5 'sudo', |
6 'tcpdump', | 6 'tcpdump', |
7 ]) | 7 ]) |
8 | 8 |
9 file {'/etc/nagios/nrpe.cfg': | 9 file {'/etc/nagios/nrpe.cfg': |
10 mode => 644, | 10 mode => '644', |
11 owner => root, | 11 owner => root, |
12 group => root, | 12 group => root, |
13 content => template('nagios/nrpe.cfg.erb'), | 13 content => template('nagios/nrpe.cfg.erb'), |
14 require => Package['nagios-nrpe-server'], | 14 require => Package['nagios-nrpe-server'], |
15 notify => Service['nagios-nrpe-server'] | 15 notify => Service['nagios-nrpe-server'] |
16 } | 16 } |
17 | 17 |
18 service {'nagios-nrpe-server': | 18 service {'nagios-nrpe-server': |
19 ensure => running, | 19 ensure => running, |
20 enable => true, | 20 enable => true, |
21 subscribe => File['/etc/nagios/nrpe.cfg'] | 21 subscribe => File['/etc/nagios/nrpe.cfg'] |
22 } | 22 } |
23 | 23 |
24 file {'/etc/sudoers.d/nagios': | 24 file {'/etc/sudoers.d/nagios': |
25 ensure => present, | 25 ensure => present, |
26 owner => root, | 26 owner => root, |
27 group => root, | 27 group => root, |
28 mode => 0440, | 28 mode => '0440', |
29 source => 'puppet:///modules/nagios/sudoers', | 29 source => 'puppet:///modules/nagios/sudoers', |
30 require => Package['sudo'], | 30 require => Package['sudo'], |
31 } | 31 } |
32 | 32 |
33 file {'/usr/lib/nagios/plugins/check_bandwidth': | 33 file {'/usr/lib/nagios/plugins/check_bandwidth': |
34 ensure => present, | 34 ensure => present, |
35 mode => 755, | 35 mode => '755', |
36 owner => root, | 36 owner => root, |
37 group => root, | 37 group => root, |
38 source => 'puppet:///modules/nagios/check_bandwidth', | 38 source => 'puppet:///modules/nagios/check_bandwidth', |
39 require => [ | 39 require => [ |
40 Package['nagios-nrpe-server'], | 40 Package['nagios-nrpe-server'], |
41 File['/etc/sudoers.d/nagios'], | 41 File['/etc/sudoers.d/nagios'], |
42 ] | 42 ] |
43 } | 43 } |
44 | 44 |
45 file {'/usr/lib/nagios/plugins/check_connections': | 45 file {'/usr/lib/nagios/plugins/check_connections': |
46 ensure => present, | 46 ensure => present, |
47 mode => 755, | 47 mode => '755', |
48 owner => root, | 48 owner => root, |
49 group => root, | 49 group => root, |
50 source => 'puppet:///modules/nagios/check_connections', | 50 source => 'puppet:///modules/nagios/check_connections', |
51 require => Package['nagios-nrpe-server'] | 51 require => Package['nagios-nrpe-server'] |
52 } | 52 } |
53 | 53 |
54 file {'/usr/lib/nagios/plugins/check_memory': | 54 file {'/usr/lib/nagios/plugins/check_memory': |
55 ensure => present, | 55 ensure => present, |
56 mode => 755, | 56 mode => '755', |
57 owner => root, | 57 owner => root, |
58 group => root, | 58 group => root, |
59 source => 'puppet:///modules/nagios/check_memory', | 59 source => 'puppet:///modules/nagios/check_memory', |
60 require => Package['nagios-nrpe-server'] | 60 require => Package['nagios-nrpe-server'] |
61 } | 61 } |
62 } | 62 } |
OLD | NEW |