diff options
author | mh <mh@immerda.ch> | 2010-07-01 04:00:06 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2010-07-01 04:00:06 +0200 |
commit | 481a621f2411fc6cb87521760897f5c5c6f47ea9 (patch) | |
tree | 839ca859255c1c3fd05b5a9f0f3dc90d425e862c /manifests | |
parent | 5761d798995156ab89f3e6dad01daa9ba1fb66ff (diff) | |
parent | 7e4078a6c038aad2e654122f6376ab3d49b25778 (diff) |
Merge remote branch 'riseup/master'
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/base.pp | 3 | ||||
-rw-r--r-- | manifests/defaults/commands.pp | 80 | ||||
-rw-r--r-- | manifests/defaults/templates.pp | 2 | ||||
-rw-r--r-- | manifests/nsca/client.pp | 6 | ||||
-rw-r--r-- | manifests/nsca/server.pp | 6 | ||||
-rw-r--r-- | manifests/target/fqdn.pp (renamed from manifests/target/nat.pp) | 2 |
6 files changed, 65 insertions, 34 deletions
diff --git a/manifests/base.pp b/manifests/base.pp index 47ef9f3..d609196 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -54,7 +54,8 @@ class nagios::base { file { 'nagios_private_resource_cfg': path => "${nagios_cfgdir}/private/resource.cfg", - source => "puppet://$server/nagios/configs/${operatingsystem}/private/resource.cfg.${architecture}", + source => [ "puppet://$server/modules/nagios/configs/${operatingsystem}/private/resource.cfg.${architecture}", + "puppet://$server/modules/site-nagios/configs/${operatingsystem}/private/resource.cfg.${architecture}" ], notify => Service['nagios'], owner => root, group => nagios, mode => '0640'; } diff --git a/manifests/defaults/commands.pp b/manifests/defaults/commands.pp index c3190af..05460f5 100644 --- a/manifests/defaults/commands.pp +++ b/manifests/defaults/commands.pp @@ -2,54 +2,84 @@ class nagios::defaults::commands { # common service commands - nagios_command { - check_dummy: + case $operatingsystem { + debian,ubuntu: { + nagios_command { + check_dummy: command_line => '$USER1$/check_dummy $ARG1$'; - check_ping: + check_https_cert: + command_line => '$USER1$/check_http --ssl -C 20 -H $HOSTADDRESS$ -I $HOSTADDRESS$'; + check_http_url: + command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$'; + check_http_url_regex: + command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$ -e $ARG3$'; + check_https_url: + command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$'; + check_https_url_regex: + command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$ -e $ARG3$'; + check_mysql_db: + command_line => '$USER1$/check_mysql -H $ARG1$ -P $ARG2$ -u $ARG3$ -p $ARG4$ -d $ARG5$'; + check_ntp_time: + command_line => '$USER1$/check_ntp_time -H $HOSTADDRESS$ -w 0.5 -c 1'; + check_silc: + command_line => '$USER1$/check_tcp -p 706 -H $ARG1$'; + check_sobby: + command_line => '$USER1$/check_tcp -H $ARG1$ -p $ARG2$'; + check_jabber: + command_line => '$USER1$/check_jabber -H $ARG1$'; + } + } + default: { + nagios_command { + check_dummy: + command_line => '$USER1$/check_dummy $ARG1$'; + check_ping: command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$'; - check-host-alive: + check-host-alive: command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1'; - check_tcp: + check_tcp: command_line => '$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$'; - check_udp: + check_udp: command_line => '$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$'; - check_load: + check_load: command_line => '$USER1$/check_load --warning=$ARG1$,$ARG2$,$ARG3$ --critical=$ARG4$,$ARG5$,$ARG6$'; - check_disk: + check_disk: command_line => '$USER1$/check_disk -w $ARG1$ -c $ARG2$ -e -p $ARG3$'; - check_all_disks: + check_all_disks: command_line => '$USER1$/check_disk -w $ARG1$ -c $ARG2$ -e'; - check_ssh: + check_ssh: command_line => '$USER1$/check_ssh $HOSTADDRESS$'; - check_ssh_port: + check_ssh_port: command_line => '$USER1$/check_ssh -p $ARG1$ $HOSTADDRESS$'; - check_http: + check_http: command_line => '$USER1$/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$'; - check_https: + check_https: command_line => '$USER1$/check_http --ssl -H $HOSTADDRESS$ -I $HOSTADDRESS$'; - check_https_cert: + check_https_cert: command_line => '$USER1$/check_http --ssl -C 20 -H $HOSTADDRESS$ -I $HOSTADDRESS$'; - check_http_url: + check_http_url: command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$'; - check_http_url_regex: + check_http_url_regex: command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$ -e $ARG3$'; - check_https_url: + check_https_url: command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$'; - check_https_url_regex: + check_https_url_regex: command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$ -e $ARG3$'; - check_mysql: + check_mysql: command_line => '$USER1$/check_mysql -H $ARG1$ -P $ARG2$ -u $ARG3$ -p $ARG4$'; - check_mysql_db: + check_mysql_db: command_line => '$USER1$/check_mysql -H $ARG1$ -P $ARG2$ -u $ARG3$ -p $ARG4$ -d $ARG5$'; - check_ntp_time: + check_ntp_time: command_line => '$USER1$/check_ntp_time -H $HOSTADDRESS$ -w 0.5 -c 1'; - check_silc: + check_silc: command_line => '$USER1$/check_tcp -p 706 -H $ARG1$'; - check_sobby: + check_sobby: command_line => '$USER1$/check_tcp -H $ARG1$ -p $ARG2$'; - check_jabber: + check_jabber: command_line => '$USER1$/check_jabber -H $ARG1$'; - } + } + } + } # commands for services defined by other modules diff --git a/manifests/defaults/templates.pp b/manifests/defaults/templates.pp index 5a3d23d..752ba60 100644 --- a/manifests/defaults/templates.pp +++ b/manifests/defaults/templates.pp @@ -1,7 +1,7 @@ class nagios::defaults::templates { file { 'nagios_templates': - path => "${nagios::nagios_cfgdir}/conf.d/nagios_templates.cfg", + path => "${nagios_cfgdir}/conf.d/nagios_templates.cfg", source => [ "puppet://$server/modules/site-nagios/configs/${fqdn}/nagios_templates.cfg", "puppet://$server/modules/site-nagios/configs/${operatingsystem}/nagios_templates.cfg", "puppet://$server/modules/site-nagios/configs/nagios_templates.cfg", diff --git a/manifests/nsca/client.pp b/manifests/nsca/client.pp index b4ca878..5314b3d 100644 --- a/manifests/nsca/client.pp +++ b/manifests/nsca/client.pp @@ -3,9 +3,9 @@ class nagios::nsca::client { package { 'nsca': ensure => installed } file { '/etc/send_nsca.cfg': - source => [ "puppet://${server}/site-nagios/nsca/{$fqdn}/send_nsca.cfg", - "puppet://${server}/site-nagios/nsca/send_nsca.cfg", - "puppet://${server}/nagios/nsca/send_nsca.cfg" ], + source => [ "puppet://${server}/modules/site-nagios/nsca/{$fqdn}/send_nsca.cfg", + "puppet://${server}/modules/site-nagios/nsca/send_nsca.cfg", + "puppet://${server}/modules/nagios/nsca/send_nsca.cfg" ], owner => 'nagios', group => 'nogroup', mode => '400', diff --git a/manifests/nsca/server.pp b/manifests/nsca/server.pp index c682e24..e1cb83c 100644 --- a/manifests/nsca/server.pp +++ b/manifests/nsca/server.pp @@ -9,9 +9,9 @@ class nagios::nsca::server { } file { '/etc/nsca.cfg': - source => [ "puppet://${server}/site-nagios/nsca/{$fqdn}/nsca.cfg", - "puppet://${server}/site-nagios/nsca/nsca.cfg", - "puppet://${server}/nagios/nsca/nsca.cfg" ], + source => [ "puppet://${server}/modules/site-nagios/nsca/{$fqdn}/nsca.cfg", + "puppet://${server}/modules/site-nagios/nsca/nsca.cfg", + "puppet://${server}/modules/nagios/nsca/nsca.cfg" ], owner => 'nagios', group => 'nogroup', mode => '400', diff --git a/manifests/target/nat.pp b/manifests/target/fqdn.pp index abb0a1e..acac5d6 100644 --- a/manifests/target/nat.pp +++ b/manifests/target/fqdn.pp @@ -1,4 +1,4 @@ -class nagios::target::nat inherits nagios::target { +class nagios::target::fqdn inherits nagios::target { Nagios_host["${fqdn}"] { address => "${fqdn}" } |