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" {  | 
||
| # 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
- ✔ Icinga2 | (spez)Plugins | define path
 - ✔ Icinga2 | add NAS-Qnap (check_qnap3)
 - ✔ icinga2 | check_ssl_cert
 - 01 ✔ Install graphite for incibaweb2 on Debian 9
 - 02 Icinga2 Modul Director on Debian9
 - 90_(Solved) Icinga error: icinga2: Can't send external Icinga command to the local command file "/var/run/icinga2/cmd/icinga2.cmd": Permission denied.
 - 99_(solved) error after enter token
 - add a client to Icinga / or Remove the client save
 - critical/icinga-app: Another instance of Icinga already running with PID
 - first Install check_nwc_health
 - Icinga config
 - Icinga2 | add a Windows Client to Icinga2 Master
 - Icinga2 | add Cisco Switch 3560 Familie
 - Icinga2 | add FreeNAS
 - Icinga2 | add Fritzbox 7490
 - Icinga2 | add Icinga2 Client (CentOS 7) to a Master (r2.10.3-1)
 - Icinga2 | add Icinga2 Client to a Master (r2.9.0-1)
 - Icinga2 | add NAS-Drobo
 - Icinga2 | add OpnSense Check (check_opnsense)
 - Icinga2 | add Proxmox
 - Icinga2 | add Raspberry Pi (Debian9)
 - Icinga2 | add service to a hostgroup
 - Icinga2 | add Supermicro IPMI
 - Icinga2 | add USV/UPS
 - Icinga2 | check_logfiles
 - Icinga2 | ClamAV ¦ check_clamav
 - icinga2 | dashing test
 - Icinga2 | define (setup) the Master
 - Icinga2 | define Hostgroup & add Host to a Hostgroup
 - Icinga2 | dependencies
 - Icinga2 | Gude Expert Power Control 8220 Serie
 - Icinga2 | notification telegram & Email
 - Icinga2 | send email notification only once (on time)
 - Icinga2 | snmp
 - Icinga2 | SNMP Unifi Pro AP
 - Icinga2 | Upgrade Information
 - icinga2 |apt wrapper |-NOK 24.08.2018
 - icinga2 |check_log
 - icinga2 Problems
 - Muster
 - Path and Links to the documentation
 - plugin - Servie - Host
 - show Version & Check's & nice icinga2 commands
 - tmpl-24x7-host-mail
 
|  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
- ✔ Icinga2 | (spez)Plugins | define path
 - ✔ Icinga2 | add NAS-Qnap (check_qnap3)
 - ✔ icinga2 | check_ssl_cert
 - 01 ✔ Install graphite for incibaweb2 on Debian 9
 - 02 Icinga2 Modul Director on Debian9
 - 90_(Solved) Icinga error: icinga2: Can't send external Icinga command to the local command file "/var/run/icinga2/cmd/icinga2.cmd": Permission denied.
 - 99_(solved) error after enter token
 - add a client to Icinga / or Remove the client save
 - critical/icinga-app: Another instance of Icinga already running with PID
 - first Install check_nwc_health
 - Icinga config
 - Icinga2 | add a Windows Client to Icinga2 Master
 - Icinga2 | add Cisco Switch 3560 Familie
 - Icinga2 | add FreeNAS
 - Icinga2 | add Fritzbox 7490
 - Icinga2 | add Icinga2 Client (CentOS 7) to a Master (r2.10.3-1)
 - Icinga2 | add Icinga2 Client to a Master (r2.9.0-1)
 - Icinga2 | add NAS-Drobo
 - Icinga2 | add OpnSense Check (check_opnsense)
 - Icinga2 | add Proxmox
 - Icinga2 | add Raspberry Pi (Debian9)
 - Icinga2 | add service to a hostgroup
 - Icinga2 | add Supermicro IPMI
 - Icinga2 | add USV/UPS
 - Icinga2 | check_logfiles
 - Icinga2 | ClamAV ¦ check_clamav
 - icinga2 | dashing test
 - Icinga2 | define (setup) the Master
 - Icinga2 | define Hostgroup & add Host to a Hostgroup
 - Icinga2 | dependencies
 - Icinga2 | Gude Expert Power Control 8220 Serie
 - Icinga2 | notification telegram & Email
 - Icinga2 | send email notification only once (on time)
 - Icinga2 | snmp
 - Icinga2 | SNMP Unifi Pro AP
 - Icinga2 | Upgrade Information
 - icinga2 |apt wrapper |-NOK 24.08.2018
 - icinga2 |check_log
 - icinga2 Problems
 - Muster
 - Path and Links to the documentation
 - plugin - Servie - Host
 - show Version & Check's & nice icinga2 commands
 - tmpl-24x7-host-mail
 
| 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/ | 
-
-
| 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
- ✔ Icinga2 | (spez)Plugins | define path
 - ✔ Icinga2 | add NAS-Qnap (check_qnap3)
 - ✔ icinga2 | check_ssl_cert
 - 01 ✔ Install graphite for incibaweb2 on Debian 9
 - 02 Icinga2 Modul Director on Debian9
 - 90_(Solved) Icinga error: icinga2: Can't send external Icinga command to the local command file "/var/run/icinga2/cmd/icinga2.cmd": Permission denied.
 - 99_(solved) error after enter token
 - add a client to Icinga / or Remove the client save
 - critical/icinga-app: Another instance of Icinga already running with PID
 - first Install check_nwc_health
 - Icinga config
 - Icinga2 | add a Windows Client to Icinga2 Master
 - Icinga2 | add Cisco Switch 3560 Familie
 - Icinga2 | add FreeNAS
 - Icinga2 | add Fritzbox 7490
 - Icinga2 | add Icinga2 Client (CentOS 7) to a Master (r2.10.3-1)
 - Icinga2 | add Icinga2 Client to a Master (r2.9.0-1)
 - Icinga2 | add NAS-Drobo
 - Icinga2 | add OpnSense Check (check_opnsense)
 - Icinga2 | add Proxmox
 - Icinga2 | add Raspberry Pi (Debian9)
 - Icinga2 | add service to a hostgroup
 - Icinga2 | add Supermicro IPMI
 - Icinga2 | add USV/UPS
 - Icinga2 | check_logfiles
 - Icinga2 | ClamAV ¦ check_clamav
 - icinga2 | dashing test
 - Icinga2 | define (setup) the Master
 - Icinga2 | define Hostgroup & add Host to a Hostgroup
 - Icinga2 | dependencies
 - Icinga2 | Gude Expert Power Control 8220 Serie
 - Icinga2 | notification telegram & Email
 - Icinga2 | send email notification only once (on time)
 - Icinga2 | snmp
 - Icinga2 | SNMP Unifi Pro AP
 - Icinga2 | Upgrade Information
 - icinga2 |apt wrapper |-NOK 24.08.2018
 - icinga2 |check_log
 - icinga2 Problems
 - Muster
 - Path and Links to the documentation
 - plugin - Servie - Host
 - show Version & Check's & nice icinga2 commands
 - tmpl-24x7-host-mail
 
I will describe how i did install the check_nwc_health plugin
to use spez Plugin i have a spez directory (--> Icinga2 | (spez)Plugins | define path)
| Step | on the Icinga2 Master | ||
| # cd /usr/lib/nagios/pluginsCustom | |||
| # mkdir check_nwc_health | |||
| # cd /usr/lib/nagios/pluginsCustom/check_nwc_health | |||
| # cd /tmp | |||
| # wget https://labs.consol.de/assets/downloads/nagios/check_nwc_health-7.1.tar.gz | |||
| # tar -xvzf check_nwc_health-7.1.tar.gz | |||
| # cd /check_nwc_health-7.1 | |||
| ./configure | |||
| make | |||
| mv plugins-scripts /usr/lib/nagios/pluginsCustom/check_nwc_health | 
-
- check_nwc_health
- Lausser and check_nwc_health on github.com
- how to install it...
-
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
-
-
-
-
- > Add a comment >
| Define a Hostgroup Debian  for all your Debian 9 client and Server  | 
# vi /etc/icinga2/conf.d/groups.conf | object HostGroup "debian9" { display_name = "Debian 9" assign where host.vars.os == "debian9" }  | 
||
| add definition to a Host | # cd /etc/icinga2/zones.d/master/ | open your hostfile endig with *.conf | object Host "client.kozo.ch" { check_command = "hostalive" //check is executed on the master display_name = "client name text" address = "10.147.42.63" vars.os = "debian9" vars.client_endpoint = "name" //follows the convention that host name == endpoint name }  | 
|
| do a check if it is OK | # icinga2 daemon -C | |||
| and if OK - restart | # systemctl reload icinga2 | 
NOW --> add service to a hostgroup
-
modul-icinga-articlelist
- ✔ Icinga2 | (spez)Plugins | define path
 - ✔ Icinga2 | add NAS-Qnap (check_qnap3)
 - ✔ icinga2 | check_ssl_cert
 - 01 ✔ Install graphite for incibaweb2 on Debian 9
 - 02 Icinga2 Modul Director on Debian9
 - 90_(Solved) Icinga error: icinga2: Can't send external Icinga command to the local command file "/var/run/icinga2/cmd/icinga2.cmd": Permission denied.
 - 99_(solved) error after enter token
 - add a client to Icinga / or Remove the client save
 - critical/icinga-app: Another instance of Icinga already running with PID
 - first Install check_nwc_health
 - Icinga config
 - Icinga2 | add a Windows Client to Icinga2 Master
 - Icinga2 | add Cisco Switch 3560 Familie
 - Icinga2 | add FreeNAS
 - Icinga2 | add Fritzbox 7490
 - Icinga2 | add Icinga2 Client (CentOS 7) to a Master (r2.10.3-1)
 - Icinga2 | add Icinga2 Client to a Master (r2.9.0-1)
 - Icinga2 | add NAS-Drobo
 - Icinga2 | add OpnSense Check (check_opnsense)
 - Icinga2 | add Proxmox
 - Icinga2 | add Raspberry Pi (Debian9)
 - Icinga2 | add service to a hostgroup
 - Icinga2 | add Supermicro IPMI
 - Icinga2 | add USV/UPS
 - Icinga2 | check_logfiles
 - Icinga2 | ClamAV ¦ check_clamav
 - icinga2 | dashing test
 - Icinga2 | define (setup) the Master
 - Icinga2 | define Hostgroup & add Host to a Hostgroup
 - Icinga2 | dependencies
 - Icinga2 | Gude Expert Power Control 8220 Serie
 - Icinga2 | notification telegram & Email
 - Icinga2 | send email notification only once (on time)
 - Icinga2 | snmp
 - Icinga2 | SNMP Unifi Pro AP
 - Icinga2 | Upgrade Information
 - icinga2 |apt wrapper |-NOK 24.08.2018
 - icinga2 |check_log
 - icinga2 Problems
 - Muster
 - Path and Links to the documentation
 - plugin - Servie - Host
 - show Version & Check's & nice icinga2 commands
 - tmpl-24x7-host-mail
 
Subcategories
Monitoring Article Count: 69
Roundcube Article Count: 1
Kolab News Article Count: 33
soho Net Article Count: 4
Perfect NAS Article Count: 28
Perfect Server Article Count: 80
Perfect Router/FW/Switch Article Count: 4
- Anker 575 USB-C Docking Station (13-in-1), 85W für Laptops
 - Perfect Server Hardware for Virtualization | Proxmox | pve-05
 - Pioneer Blu-Ray/BD/DVD/CD Reader/writer USB 3.0 BDR-XD07TB | WORKS OK with Debian 11
 - NOT WORKING WITH DEBIAN 11 | Dockingstation | IcyBox 14-in-1 USB Type-C | IB-DK2262AC
 - How to remove systemd services
 - Laptop | Lenovo | Thinkpad E15 Gen3 AMD
 - Laptop | Lenovo | LENOVO-IDEA IdeaPad 3 15IGL05 Notebook (15.6 ", 128 GB SSD, Business Black)
 - D. Klimo | Kent monoblocks
 - TTN Mapper
 - LILYGO TTGO T-Beam V1.1 ESP32 LoRa 868Mhz GPS 18650 Board
 - LILYGO® TTGO T-Beam 868MHz -> The Things Network (TTN/TTS) -> Karte | Infos und Video bei Alex (www.aeq-web.com)
 - Kabelfarben 3.3V, 5V, 12V, 230V | Durchmesser
 - 01 Digi-Bee Stand01 Wetter
 - Solar Panel | 6V 3W Solar Panel JY D145x145
 - TTGO LoRa32 V2.1_1.6 version 433/868/915Mhz ESP32 LoRa OLED 0.96 Inch SD Card Bluetooth WIFI wireless Module ESP-32 SMA
 - -pve-04 | Disk SSD and HDD
 - DISK SSD | 1 TB | Samsung SSD 870 EVO 1TB - 1TB
 - NanoVNA V2
 - CubeSat | antennas |
 - KoZo_GS3_433MHz
 - tinyGS - shortcut what it means
 - TinyGS Telegram community | published Links
 - Wolfgang W. Osterhage (Springer Verlag Sachbuch 2021): Die Geschichte der Raumfahrt | (gefundene Fehler)
 - ucs Univention some commands
 - SMA-Stecker / SMA-Buchse
 
 
                    
                                        Die EU-Kommission will unverzüglich die Finanzierung von Spyware-Produzenten einstellen, die sich "schweren beruflichen Fehlverhaltens" schuldig gemacht haben.                    
                    
                    
                                        Microsoft hält eine Lücke in der LNK-Anzeige für nicht behebenswert. Sie wurde inzwischen gegen europäische Diplomaten missbraucht.                    
                    
                    
                                        Angreifer können IBM Tivoli Monitoring und Nagios XI attackieren und Dateien manipulieren oder sogar Schadcode ausführen. Sicherheitsupdates sind verfügbar.                    
                    
                    
                                        Angreifer missbauchen Schwachstellen in VMware und XWiki, warnt die IT-Sicherheitsbehörde CISA. Updates stopfen die Lücken.                    
                    
						
						
						
						
						
						
						