wombat.ch

your Partner for Network Design and CMS

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

Attachments:
FileDescriptionFile sizeDownloads
Download this file (object CheckCommand.txt)object CheckCommand.txt 0.7 kB1175

RSS Feed


Warning: file_get_contents(https://www.bsi.bund.de/SiteGlobals/Functions/RSSFeed/RSSNewsfeed/RSSNewsfeed_WID.xml): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(https://www.bsi.bund.de/SiteGlobals/Functions/RSSFeed/RSSNewsfessBSIFB/RSSNewsfeed_BuergerCERT.xml): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(http://feeds.joomla.org/JoomlaAnnouncements): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(http://feeds.joomla.org/JoomlaSecurityNews): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

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

We have 357 guests, one bot and no members online


one bot:
1 x BOT for JCE