diff --git a/nagios/manifests/target.pp b/nagios/manifests/target.pp index 909c38a..950d44a 100644 --- a/nagios/manifests/target.pp +++ b/nagios/manifests/target.pp @@ -2,7 +2,7 @@ # class nagios::target { - @@nagios::host { $fqdn: + @@nagios::host { $::homename: group => $::domain, osname => $::operatingsystem, osicon => $::osfamily ? { @@ -12,7 +12,7 @@ class nagios::target { } Nagios::Service { - host => $::fqdn, + host => $::homename, group => $::domain, } @@ -23,7 +23,7 @@ class nagios::target { # class nagios::target::ssh inherits nagios::target { - @@nagios::service { "${fqdn}_ssh": + @@nagios::service { "${::homename}_ssh": command => "check_ssh", description => "SSH", } @@ -35,7 +35,7 @@ class nagios::target::ssh inherits nagios::target { # class nagios::target::http inherits nagios::target { - @@nagios::service { "${fqdn}_http": + @@nagios::service { "${::homename}_http": command => "check_http", description => "HTTP", } @@ -47,7 +47,7 @@ class nagios::target::http inherits nagios::target { # class nagios::target::https inherits nagios::target { - @@nagios::service { "${fqdn}_https": + @@nagios::service { "${::homename}_https": command => "check_http!--ssl", description => "HTTPS", } @@ -59,7 +59,7 @@ class nagios::target::https inherits nagios::target { # class nagios::target::smtp inherits nagios::target { - @@nagios::service { "${fqdn}_smtp": + @@nagios::service { "${::homename}_smtp": command => "check_smtp", description => "SMTP", } @@ -137,7 +137,7 @@ class nagios::target::nrpe inherits nagios::target { require => File["/etc/nrpe.d"], notify => Service["nrpe"], } - @@nagios::service { "${fqdn}_disk": + @@nagios::service { "${::homename}_disk": command => "check_nrpe!check_disk", description => "Disk", } @@ -151,7 +151,7 @@ class nagios::target::nrpe inherits nagios::target { require => File["/etc/nrpe.d"], notify => Service["nrpe"], } - @@nagios::service { "${fqdn}_load": + @@nagios::service { "${::homename}_load": command => "check_nrpe!check_load", description => "Load", } @@ -165,17 +165,17 @@ class nagios::target::nrpe inherits nagios::target { require => File["/etc/nrpe.d"], notify => Service["nrpe"], } - @@nagios::service { "${fqdn}_swap": + @@nagios::service { "${::homename}_swap": command => "check_nrpe!check_swap", description => "Swap", } -# @@nagios::service { "${fqdn}_users": +# @@nagios::service { "${::homename}_users": # command => "check_nrpe!check_users", # description => "Users", # } # -# @@nagios::service { "${fqdn}_procs": +# @@nagios::service { "${::homename}_procs": # command => "check_nrpe!check_total_procs", # description => "Processes", # }