wombat.ch

your Partner for Network Design and CMS

Perfect

Icinga2 | dependencies

Imagine, you have a Switch with 3 NAS on it - the NAS are not often used and Switched off like the Switch itself.
so
the Host-Check to the NAS should only be when Switch is on and hostalive!
the NAS-Service-Check should only be if the NAS ist up = hostalive!

#  cd /etc/icinga2/conf.d
#  mkdir dependence
#   cd dependence
#   vi switch2nas.conf
object Dependency "switch2nas" {
    parent_host_name = "swt-03.kozo.ch"

    child_host_name = "NAS-01.kozo.ch"
    child_host_name = "NAS-02.kozo.ch"
    child_host_name = "NAS-03.kozo.ch"

     states = [ Up ]

     disable_checks = true
       disable_notifications = true

 }
   Go to the Host you wish to add the dependency

This will by a Host - Host dependency
if the Switch swt-03 is down 
the NAS-01 get unrechable marked

object Dependency "nas-01-swt-03" {
     parent_host_name = "swt-03.kozo.ch"
     child_host_name = "NAS-01.kozo.ch"
      states = [ Up ]
      disable_checks = true
      ignore_soft_states = true
     disable_notifications = true
 }

 
       
       
       
       
       
       
       
  #   icinga2 daemon -C    
  #   systemctl reload icinga2    
  #   systemctl status icinga2    
  #   multitail /var/log/icinga2/icinga2.log    

-
-

Quellle/Source:
-

-
-
Icinga2 Doc | Dependency
Icinga2 Doc | Dependencies
Icinga2 Doc | Apply Dependencies to Hosts and Services
-
-
-
-
-
-
-
- -


modul-icinga-articlelist

Add a comment
Icinga2 |add Raspberry Pi (Debian9)


     
   object CheckCommand "by_ssh_apt" {  
        import "by_ssh"

        vars.by_ssh_command = "/usr/lib/nagios/plugins/check_apt -w $by_ssh_apt_warn$ -c $by_ssh_apt_crit$"  
                vars.by_ssh_apt_warn = "75%"  
                vars.by_ssh_apt_crit = "50%"
}

apply Service "by_ssh_apt" {  
          import "generic-service"

          host_name = "10.147.42.32"  
          check_command = "by_ssh_apt"

          vars.by_ssh_logname = "pi"

}
 
     












QUellen/Source:
docs/icinga2/latest/doc/07-agent-based-monitoring/#ssh
remote-sensor-raspberry-pi-locale-temperature-monitoring-snmp-and-cacti
-
-
-
-
-
-
-
-
- monitoring-portal.org
_

modul-icinga-articlelist

Add a comment






the place of the Plugin itself #   cd /usr/lib/nagios/pluginsCustom  
the plugin - make a servie #   cd /etc/icinga2/conf.d  
the service - add to host or hostgroup #   cd /etc/icinga2/zones.d/  

Add a comment
-
-
-
create a email Address for this Purpose This email address is being protected from spambots. You need JavaScript enabled to view it.
check if a MTA
(Mail Transfer Agent)
is working
echo "Test hier kann viel stehen" | mail -s "Test mail subject 15"   This email address is being protected from spambots. You need JavaScript enabled to view it.
#   vi /etc/icinga2/conf.d/users.conf add your email address around line 12 on a Default installation
       
       
       
       
       
       
       
 vars.notification["mail"] = {
    groups = [ "icingaadmins" ]
}













Quellen/Source:
-
- https://blog.mattionline.de/icinga2-push-notification-via-telegram/
- https://github.com/sysadmama/icinga2-notification-telegram
- https://github.com/lazyfrosch/icinga2-telegram
-
- (2016) NETWAYS Video: Icinga 2: Einrichten von Notifications (Webinar vom 21. Januar 2016)
-
-
-
-

modul-icinga-articlelist

Add a comment

Subcategories

Roundcube ist eine freie Software für Webmail über IMAP, die in den Programmiersprachen PHP und JavaScript entwickelt wird. Roundcubes prominenteste Features sind die schlanke und moderne Benutzeroberfläche und die ausgeprägte Nutzung der Ajax-Technologie, die einen ähnlichen Bedien-Komfort wie bei einer lokal installierten Anwendung ermöglicht.

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

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 417 guests and no members online

We have 390 guests, one bot and no members online


one bot:
1 x BOT for JCE