wombat.ch

your Partner for Network Design and CMS

Message
  • Failed loading XML...
  • Failed loading XML... Opening and ending tag mismatch: link line 1 and head Entity 'hellip' not defined Entity 'hellip' not defined Entity 'hellip' not defined Entity 'hellip' not defined Entity 'hellip' not defined Entity 'hellip' not defined Entity 'hellip' not defined Entity 'raquo' not defined Entity 'nbsp' not defined Entity 'nbsp' not defined Entity 'nbsp' not defined Entity 'nbsp' not defined Entity 'nbsp' not defined Opening and ending tag mismatch: link line 1 and html Premature end of data in tag meta line 1
  • Failed loading XML... Opening and ending tag mismatch: link line 1 and head Opening and ending tag mismatch: img line 1 and a Opening and ending tag mismatch: a line 1 and div Opening and ending tag mismatch: input line 1 and p Opening and ending tag mismatch: input line 1 and form Opening and ending tag mismatch: input line 1 and div Opening and ending tag mismatch: p line 1 and div Opening and ending tag mismatch: form line 1 and div Opening and ending tag mismatch: hr line 1 and div Entity 'nbsp' not defined Entity 'agrave' not defined Entity 'nbsp' not defined Entity 'ntilde' not defined Entity 'ccedil' not defined Entity 'nbsp' not defined Entity 'nbsp' not defined Entity 'nbsp' not defined Entity 'aring' not defined Entity 'ecirc' not defined Entity 'acirc' not defined Entity 'nbsp' not defined Entity 'uuml' not defined Entity 'ccedil' not defined Entity 'nbsp' not defined Entity 'emsp' not defined Entity 'copy' not defined Opening and ending tag mismatch: br line 1 and p Opening and ending tag mismatch: br line 1 and div Opening and ending tag mismatch: p line 1 and div Opening and ending tag mismatch: div line 1 and body Opening and ending tag mismatch: hr line 1 and html Premature end of data in tag hr line 1

add a service to a hostgroup

i have a couple of Debian 9 "Server/Host/Client" they all should have some Basic Service Check like (apt, disk, mem, swap, procs, users, running_kernel, apt, ssh, iostat, ping4, fping4, tcp, udp, ssl, ntp_time)

because i don't want to add this check to each host  i did define a hostgroup and add the hostgroupname to the host (--> "define Hostgroup & add Host to a Hostgroup")

 Merci to rsx (Roland) 

 steps i have done... icinga2 Master
 went to the zone.d #  cd /etc/icinga2/zones.d/
 crate a new directory #  mkdir services
 went to the new directory #  cd /services
or #  cd /etc/icinga2/zones.d/services
open a new file # vi service2debian9.conf      
to check apt on all defined Debian 9 "Host/Server/Client" apply Service "apt" {
  import "generic-service"
  check_command = "apt"

  assign where host.address && host.vars.os == "debian9"
  command_endpoint = host_name
 }
     
to Check swap apply Service "swap" {
  import "generic-service"
  check_command = "swap"

  assign where host.address && host.vars.os == "debian9"
  command_endpoint = host_name
 }
     
 Check it if it for error #  icinga2 daemon -C      
if ok #  systemctl restart icinga2      





---

 Sometimes all would be perfect but a Service is on a Host not needed or not available.
so you will get a error.
to avoid the error - just ignore the host like this

32 apply Service "swap" {
33 import "generic-service"
34 check_command = "swap"
35
36 assign where host.address && host.vars.os == "debian9"
37 ignore where host.name == "memoryalpha.kozo.ch"
38 command_endpoint = host_name
39 }
     
  #  icinga2 daemon -C      
  #  systemctl restart icinga2      

---
Quellen/Source:
- 05-service-monitoring/#general-monitoring
have a look and for my test
-
-
-
-
-

RSS Feed


Warning: Invalid argument supplied for foreach() in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 39

neusten Links


Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/clients/client2/web2/web/j/modules/mod_quicklistweblinks/helper.php on line 78
many More Links »

part of ...

Linux Counter

Disqus

 

Learning Network

Seti@home & Boinc

myBonic

statistik

 


Who is Online

We have 548 guests and no members online

We have 547 guests, one bot and no members online


one bot:
1 x BOT for JCE