wombat.ch

your Partner for Network Design and CMS

Perfect

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 comment

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

- Add a comment

#  cd /etc/icinga2/conf.d conf.d Directory (hosts.conf, services.conf, users.conf, notifications.conf, commands.conf, groups.conf, templates.conf, downtimes.conf, timeperiods.conf, api-users.conf, app.conf )
Service icinga.com/docs/icinga2/latest/doc/09-object-types/#service
       
       
Warning/Critical how to define +/- Nagios Guideline (search for " Threshold and Ranges " )  
       
       
       
       
Add a comment

Icinga2 | Upgrade Information for Debian 9
Icinga2 Update/Upgrade information

Step todo comand text -
For a Client check the Version you have #  icinga2 --version
0
#  wget -O - https://packages.icinga.com/icinga.key | apt-key add -
#  vi /etc/apt/sources.list deb http://packages.icinga.com/debian icinga-stretch main
deb-src http://packages.icinga.com/debian icinga-stretch main
#  apt update -y
         
         
For the Master   #  icinga2 --version   (version: r2.6.0-1) i do have
  First update to 2.7 #  vi /etc/default/icinga2 ICINGA2_CACHE_DIR=/var/cache/icinga2  
    #  systemctl restart icinga2    
  then to 2.8 # ls /usr/share/icinga2-ido-mysql/schema/upgrade/   ls should Show some *.SQL file
    # mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/2.8.0.sql   and also if you have newer files too





- - - -

modul-icinga-articlelist

 

- - - -


Quellen/Source:
- Upgrading Icinga 2
- [dev.icinga.com #13255] Deprecate cluster/client mode "bottom up" w/ repository.d and node update-config
-
-
-
-
-

Add a comment
Icinga2 | Plugins | define path


 0 default Plugins on Debian  #  /usr/lib/nagios/plugins --> source 
define a new path for not default or modified Plugins #  mkdir /usr/lib/nagios/pluginsCustom
define the new Path to ... #  vi /etc/icinga2/constants.conf const PluginCustomDir = "/usr/lib/nagios/pluginsCustom"
 restart #  systemctl restart icinga2
#  systemctl status icinga2
       
       
  the Path i do use for new Plugins is #  cd /usr/lib/nagios/pluginsCustom  
  and i do create a Directory for echa plugin too #  mkdir new-plugin  
Add a comment
Icinga2 | add a Windows Client to Icinga2 Master


 step todo Master Master text Client Client text
           
           
           


- - - - -

- - - - -

Source/Quellen:
- () | Icinga Doc offiziel
- ICINGA Package Repository Windows

- (2018update) LinuxTechi |How to add remote Linux and Windows Host to Icinga 2 for Monitoring
-
-
- (2016) Brunner-IT |Icinga Agent – erster Windows Client überwachen
-
-
-
-
-
- Add a comment

Icinga2 | define (setup) the Master

 1 on a running Icinga #  icinga2 node wizard Please specify if this is a satellite setup ('n' installs a master setup) [Y/n]     : n
       
       
2 Zone.conf definition # vi /etc/icinga2/zones.conf object Endpoint "icinga.server.de" {
  }
  object Zone "icinga.server.de" {
          endpoints = ["icinga.server.de" ]
  }
3   #  /etc/init.d/icinga2 restart  
       
       
     
    # ps aux | grep icinga2  
       
       
--- ---> then add a Client Icinga2 | add Icinga2 Client to a Master


Source/Quellen:
- (2017) Icinga2: Remote Clients (just the first part / erster Abschnitt)
-
-
-
-

Add a comment
Icinga2 | add Proxmox

the user we crate for monitoring is   icinga2monitoring


1 Proxmox
crate a user for monitoring
Login to CLI
#  pveum useradd icinga2monitoring@pve -comment "Icinga2 Monitoring"
#   pveum passwd icinga2monitoring@pve
#   pveum aclmod / -user icinga2monitoring@pve -role PVEAuditor
  or just a API_User #    pvesh create /access/users -userid icinga2monitoring@pve  
       
       
       
       









Quellen/Source:
Github | nbuchwitz/check_pve
- exchange.icinga.com Proxmox
- Proxmox Doc | VE API
-
Docu Proxmox | user Management
-
-
-

Forum Proxmox | frage zu user und Sinn...

modul-icinga-articlelist

Add a comment

Icinga2 | add OpnSense
for the spez Plugin path --> Icinga2 | (spez)Plugins | define path

# icinga2 daemon -C = (version: r2.9.1-1)

 step Icinga2 Master Action on the OPNSense device
go to [user Manager]
create a user icinga2
1 #   apt install -y python-enum34 python-requests
2 #  cd /usr/lib/nagios/pluginsCustom
#   mkdir opnsense
#   cd opnsense
wget https://raw.githubusercontent.com/nbuchwitz/check_opnsense/master/check_opnsense.py
  chmod +x check_opnsense.py      
  # icinga2 daemon -C      
  mkdir /etc/icinga2/conf.d/opnsense      
   vi /etc/icinga2/conf.d/opnsense/opnsene-update.conf object CheckCommand "check_opnsense-update" {

command = [ PluginCustomDir + "/opnsense/check_opnsense.py" ]

arguments = {
"-H" = "$opnsense_host$"
"--api-key" = "$opnsense_api_key$"
"--api-secret" = "$opnsense_api_secret$"
"-m" = "$opnsense_function$"
"-w" = "$opnsense_TRESHOLD_WARNING$"
"-c" = "$opnsense_TRESHOLD_CRITICAL$"
"-k" = "$opnsense_insecure$"
}

vars.opnsense_host = "10.147.42.7"
vars.opnsense_api_key = "key"
vars.opnsense_api_secret = "key"
vars.opnsense_function = "updates"
vars.opnsense_insecure = "-k"
}
   
         
  #  cd /etc/icinga2/zones.d/master/    open the file your host is defined      
 

vi   xxxxxx.conf

to check for update is Default 5 minutes not necessary
every hour is enough so check_interval to 1h

9 object Service "check_opnsense" {
10 host_name = "opnsense.domain"
check_interval = 1h
11 check_command = "check_opnsense-update"
12 }
   
  # icinga2 daemon -C      
  #  systemctl restart icinga2      











-
-
-
-
-
uptime  snmpwalk -v2c -c public 10.147.42.7 iso.3.6.1.2.1.25.1.1.0 Timeticks: (63656350) 7 days, 8:49:23.50
   snmpwalk -v2c -c public 10.147.42.7 iso.3.6.1.2.1.1.1.0 STRING: "FreeBSD FW-03.kozo.ch 11.1-RELEASE-p11 FreeBSD 11.1-RELEASE-p11  21b4c8ea1d5(stable/18.7) amd64"
Hostname snmpwalk -v2c -c public 10.147.42.7 iso.3.6.1.2.1.1.5.0 STRING: "FW-03.kozo.ch"
     
     
     
     
     
     
    iso.3.6.1.4.1.2021.10.1.2.1 = STRING: "Load-1"
iso.3.6.1.4.1.2021.10.1.2.2 = STRING: "Load-5"
iso.3.6.1.4.1.2021.10.1.2.3 = STRING: "Load-15"
iso.3.6.1.4.1.2021.10.1.3.1 = STRING: "0.40"
iso.3.6.1.4.1.2021.10.1.3.2 = STRING: "0.52"
iso.3.6.1.4.1.2021.10.1.3.3 = STRING: "0.49"
     
    iso.3.6.1.2.1.31.1.1.1.1.2 = STRING: "igb1"
iso.3.6.1.2.1.31.1.1.1.2.2 = Counter32: 8742
iso.3.6.1.2.1.25.3.2.1.3.262146 = STRING: "network interface igb1"
    iso.3.6.1.2.1.31.1.1.1.1.1 = STRING: "igb0"
iso.3.6.1.2.1.31.1.1.1.2.1 = Counter32: 0
iso.3.6.1.2.1.25.3.2.1.3.262145 = STRING: "network interface igb0"
    iso.3.6.1.2.1.31.1.1.1.1.3 = STRING: "igb2"
iso.3.6.1.2.1.31.1.1.1.2.3 = Counter32: 0
iso.3.6.1.2.1.25.3.2.1.3.262147 = STRING: "network interface igb2"
    iso.3.6.1.2.1.31.1.1.1.1.8 = STRING: "ath0_wlan1"
iso.3.6.1.2.1.31.1.1.1.2.8 = Counter32: 0
iso.3.6.1.2.1.25.3.2.1.3.262152 = STRING: "network interface ath0_wlan1"
-
-
Source/Quellen:
-
- github.com/nbuchwitz/check_opnsense
Formun Opnsense | API Information request
-
-
-
-
- Add a comment

Icinga2 | add Supermicro IPMI
for the spez Plugin path --> Icinga2 | (spez)Plugins | define path

working on Icinga2 (version: r2.9.1-1)



  Supermicro backend Add a user with some right 
user icinga2
pwd icinga24
 
       
 steps on Icinga2
       
  #   arp -n | grep 0c:c4:7a:ee:42:1c | awk '{print $1}' this is the IP of the IPMI Port (the Eth.Port has DHCP)  
       
  apt install -y libipc-run-perl    
       
  wget http://ftp.gnu.org/gnu/freeipmi/freeipmi-1.6.2.tar.gz
tar xzvf freeipmi-1.6.2.tar.gz
cd freeipmi-1.6.2
apt install -y build-essential libgcrypt11-dev
./configure
make
make install
ldconfig
   
       
 1 #   cd /usr/lib/nagios/pluginsCustom
#   wget  https://raw.githubusercontent.com/thomas-krenn/check_ipmi_sensor_v3/master/check_ipmi_sensor
#  chmod +x check_ipmi_sensor

 b  ./check_ipmi_sensor Can't locate IPC/Run.pm in @INC (you may need to install the IPC::Run module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./check_ipmi_sensor line 35.
BEGIN failed--compilation aborted at ./check_ipmi_sensor line 35.
c  curl -L http://cpanmin.us | perl - -- App::cpanminus
cpanm --with-recommends --force IPC::Run
   
   ./check_ipmi_sensor    
       
       
       
  #    icinga2 daemon -C    
  #    systemctl reload icinga2    
  #    systemctl restart icinga2    
  #    multitail /var/log/icinga2/icinga2.log    
-
-
 

Source/Quellen:
-
thomas-krenn | IPMI Sensor Monitoring Plugin
- thomas-krenn | FreeIPMI
thomas-krenn | IPMI Konfiguration für Supermicro Systeme
-
-
-
-
-
-
-

modul-icinga-articlelist

Add a comment
Icinga2 | add NAS-Qnap vor my old QNAP TS-212
for the spez Plugin path --> Icinga2 | (spez)Plugins | define path
working on Icinga2 (version: r2.9.1-1)



 steps on Icinga2    
 1 #   cd /usr/lib/nagios/pluginsCustom    
 2 #  mkdir check_qnap3    
 3 #  cd check_qnap3
#   cd /usr/lib/nagios/pluginsCustom/check_qnap3
   
 4 #  wget https://raw.githubusercontent.com/nikband/check_qnap3.sh/master/check_qnap3.sh    
 5 #  chmod +x  check_qnap3.sh    
 6  #  ./check_qnap3.sh 10.147.42.70 public systemuptime 0 0    
 7 #   cd /etc/icinga2/conf.d/nas-01    
       
       
 8 #  vi check_qnap3-sysinfo.conf
   
  object CheckCommand "check_qnap3-sysinfo" {

command = [ PluginCustomDir + "/check_qnap3/check_qnap3.sh" ]

arguments = {
"$ARG1$" = {
value = "$qnap_host$"
skip_key = true
}

"$ARG2$" = {
value = "$qnap_community$"
skip_key = true
}

"$ARG3$" = {
value = "$qnap_check$"
skip_key = true
}
"$ARG4$" = {
value = "$qnap_warning$"
skip_key = true
}
"$ARG5$" = {
value = "$qnap_critical$"
skip_key = true
}
}

vars.qnap_host = "$host.address$"
vars.qnap_community = "public"
vars.qnap_check = "sysinfo"
vars.qnap_warning = "0"
vars.qnap_critical = "0"
}
   
 9 #  cd /etc/icinga2/zones.d/    
 10 #  mkdir nas-01    
 11 #  cd nas
#  cd  /etc/icinga2/zones.d/nas-01
   
 12 # vi check_qnap3-sysinfo.conf    
  apply Service "check_qnap3-sysinfo" {
  import "generic-service"
  display_name = "QNAP - Sysinfo"
  check_command = "check_qnap3-sysinfo"
  assign where host.address && host.vars.os == "QNAP"
}
   
       
       
13 #   icinga2 daemon -C    
14 #   systemctl reload icinga2    
15 #   systemctl status icinga2    
16 #   multitail /var/log/icinga2/icinga2.log    
       
if it works      
  #   cd /etc/icinga2/conf.d/nas-01    
  #    cp workingfile.conf   newfile.conf      "and edit the new file"    
  #    cd  /etc/icinga2/zones.d/nas-01    
  #    cp workingfile.conf newfile.conf        "and edit the new file"    

 

 Error

   

 

 
./check_qnap3.sh 10.147.42.70 public sysinfo 0 0
./check_qnap3.sh 10.147.42.70 public systemuptime 0 0
./check_qnap3.sh 10.147.42.70 public volstatus 0 0
./check_qnap3.sh 10.147.42.70 public temp 0 0
./check_qnap3.sh 10.147.42.70 public cpu 0 0
./check_qnap3.sh 10.147.42.70 public freeram 0 0
./check_qnap3.sh 10.147.42.70 public diskused 0 0
./check_qnap3.sh 10.147.42.70 public hdstatus 0 0
./check_qnap3.sh 10.147.42.70 public fans 0 0




Source/Quellen:
- Githup check_qnap3
-
-
-
-
-
-
-
-
-
-


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

We have 412 guests, no bots and no members online