wombat.ch

your Partner for Network Design and CMS

Software Information

config | Graylog 2.4 | Cisco Switch

Cisco Config Graylog  
> enable

# conf t

(config)#service timestamps log datetime msec
(config)#service timestamps debug datetime msec
(config)#logging host 10.147.42.40
(config)#logging trap 5
(config)#logging
(config)#logging source-interface loopback 0
(config)#logging origin-id string switch01
   
Add a comment

Icinga2 | add Icinga2 Client (CentOS 7) to a Master (r2.10.3-1)

 

Step  Master Debian 9 stretch Master_________________ Client "CentOS 7" Client stretch
  #  icinga2 --v icinga2 (version: r2.9.0-1)    
  #  vi /etc/icinga2/zones.conf object Endpoint "client.kozo.ch" {
host = "10.147.42.50"
}

object Zone "client.kozo.ch" {
endpoints = [ "client.kozo.ch" ]
parent = "master"
}
   

#  cd /etc/icinga2/zones.d/master/

#  vi host.conf
or a new file


mk

object Host "client.kozo.ch" {
check_command = "hostalive" //check is executed on the master
display_name = "client test"
address = "10.147.42.63"
vars.os = "debian9"
zone = "master"
vars.client_endpoint = name //follows the convention that host name == endpoint name
}


object Service "apt" {
host_name = "client.kozo.ch"
check_command = "apt"
command_endpoint = host_name
}

  #   icinga2 daemon -C      
  #  systemctl restart icinga2.service      
  #  systemctl status icinga2.service      
  #  multitail /var/log/icinga2/icinga2.log      
  add some more Software   #  yum install epel-release

#  yum install centos-release-scl
 
     

 

      # yum update -y  
         
      #  subscription-manager repos --enable rhel-7-server-optional-rpms

#  subscription-manager repos --enable rhel-server-rhscl-7-rpms

#  rpm --import https://packages.icinga.com/icinga.key

#  yum install https://packages.icinga.com/epel/icinga-rpm-release-7-latest.noarch.rpm
 
         
# apt install -y bash-completion
# apt install -y -f icinga2
# apt install -y -f nagios-plugins
# systemctl restart icinga2
# systemctl status icinga2
# systemctl enable icinga2
#  icinga2 feature list
#  icinga2 feature enable command
#  systemctl restart icinga2
#  icinga2 node wizard

 icinga2-01.kozo.ch

 

 

10.147.42.36

#  vi /etc/icinga2/zones.conf

object Endpoint "icinga2-01.kozo.ch" {
        host = "10.147.42.36"
        port = "5665"
 }

object Zone "master" {
        endpoints = [ "icinga2-01.kozo.ch" ]
 }

object Endpoint "client" {
 }

object Zone "client" {
     endpoints = [ "client" ]
     parent = "master"
 }

#  service icinga2 restart
#  systemctl restart icinga2.service
#  systemctl status icinga2.service
icinga2 node list
# icinga2 node update-config
#  multitail /var/log/icinga2/icinga2.log #  multitail /var/log/icinga2/icinga2.log
Service löschen die es nicht braucht

#  vi /etc/icinga2/conf.d/services.conf

#  service icinga2 restart
icinga2 node list
# icinga2 node update-config

#  icinga2 daemon -C

# systemctl restart icinga2
# systemctl status icinga2

Add a comment

Read more: Icinga2 | add Icinga2 Client (CentOS 7) to a Master (r2.10.3-1)

Icinga2 | 
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
#   wget  
#  chmod +x 

 b
       
       
       
       
  #  icinga2 daemon -C    
  #  time systemctl reload icinga2    
  #  time systemctl restart icinga2    
  #   multitail /var/log/icinga2/icinga2.log    
c      
-
-
- - - -
Quellen/Source:
- icinga2 Docs | Disable Re-notifications  
-
-
-
-
-
dokuwiki.tachtler.net
- Add a comment
Icinga2 | 
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
#   wget  
#  chmod +x 

Groups      
vars.secu.scanner = ClamAV
       
       
       
       
  #  icinga2 daemon -C    
  #  time systemctl reload icinga2    
  #  time systemctl restart icinga2    
  #   multitail /var/log/icinga2/icinga2.log    
c      
-
-
- - - -
Quellen/Source:
- dokuwiki.tachtler.net | check_clamav  
-
-
- Clamscan Monitoring Plugin – Thomas-Krenn-Wiki
-
-
dokuwiki.tachtler.net
- Add a comment
Icinga2 | 
for the spez Plugin path --> Icinga2 | (spez)Plugins | define path
working on Icinga2 (version: r2.9.1-1)
github | syswombat | Unifi AP




 steps on Icinga2
 1 #   cd /usr/lib/nagios/pluginsCustom
#   wget  
#  chmod +x 
#   cd /etc/icinga2/zones.d/master/08_WLAN
#   vi /etc/icinga2/zones.d/master/08_WLAN/check_unifi-c.conf
 b
       
   #   vi /etc/icinga2/zones.d/master/08_WLAN/check_unifi-s.conf    
       
       
  #  time icinga2 daemon -C    
  #  time systemctl reload icinga2    
  #  time systemctl restart icinga2    
  #   multitail /var/log/icinga2/icinga2.log    
c      
-
-
-
snmpwalk -v 2c -c public 10.147.42.54 .1.3.6.1.2.1.1.1 UAP-AC-Pro-Gen2 3.9.42.9152  
snmpwalk -v 2c -c public 10.147.42.54 .1.3.6.1.2.1.1.3 Timeticks: (77741956) 8 days, 23:56:59.56  
snmpwalk -v 2c -c public 10.147.42.54 1.3.6.1.4.1.41112.1.6.3.6.0 STRING: "3.9.42.9152"  
snmpwalk -v 2c -c public 10.147.42.54 1.3.6.1.4.1.41112.1.6.1.2.1.8.2 INTEGER: 2 shows user connected
 snmpwalk -v 2c -c public 10.147.42.54 iso.3.6.1.4.1.41112.1.6.1.2.1.9 | awk '{print $4}'  if x = "ng"
the echo 2.4 Ghz
else
    echo 5 Ghz
 

-
-
- - - -
Quellen/Source:
-  
-
-
-
-
-
dokuwiki.tachtler.net
- Add a comment
Icinga2 | check_logfiles
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
  #   mkdir check_logfiles    
  #   cd check_logfiles    
       
#   wget  https://labs.consol.de/assets/downloads/nagios/check_logfiles-3.9.tar.gz
  #   tar zxvf check_logfiles-3.9.tar.gz    
  #    cd check_logfiles-3.9    
  ./configure
make
make
install
   
       
       
#  chmod +x 
       
       

 b  vi gesuelze.cfg
   1 @searches = ({
2 tag => '0815',
3 logfiles => '/var/log/messages',
4 criticalpatterns => '.*0815.*',
5 rotation => 'debian',
6 options => 'noprotocol'
7 });
   
       
   ./check_logfiles -f gesuelze.cfg    
   # ./check_logfiles -f gesuelze.cfg
Use of uninitialized value $_[0] in substitution (s///) at /usr/share/perl/5.24/File/Basename.pm line 180.
fileparse(): need a valid pathname at ./check_logfiles line 2632.
   
       
       
       
       
  #  icinga2 daemon -C    
  #  time systemctl reload icinga2    
  #  time systemctl restart icinga2    
  #   multitail /var/log/icinga2/icinga2.log    
c      
-
-
- - - -
Quellen/Source:
-  
labs.consol.de/nagios/check_logfiles
Github | lausser - check_logfiles
-
https://medium.com/luma-consulting/how-to-install-check-logfiles-on-ubuntu-linux-to-work-with-nagios-23e8b034a8a5
-
-
- Add a comment
  # vi /etc/icinga2/conf.d/09_log-checks/check_radius-log.conf  
 

 object CheckCommand "check_radius-log" {

            command = [ PluginDir + "/check_log" ]

            arguments = {
                      "-F" = "/var/log/freeradius/radius.log"
                      "-q" = "[auth]"
            }
}

object Service "check_radius_log" {

            host_name = "radius-01.kozo.ch"

            check_command = "check_radius-log" 
            display_name = "[auth] - Radius LOG: "

            check_interval = 30

            command_endpoint = host_name
}

 
     
fail2ban apt install -y geoip-bin  
  /var/log/fail2ban.log  
  ban 181.214.206.94  
  geoiplookup 65.52.67.244  | cut -d ':' -f2
geoiplookup 150.107.148.155  | cut -d ':' -f2
geoiplookup 181.214.206.123 | cut -d ':' -f2
 
     
  geoiplookup -f /usr/share/GeoIP/GeoLiteCity.dat 65.52.67.244  
  geoiplookup -f /usr/share/GeoIP/GeoLiteCity.dat 144.167.32.105 | cut -d':' -f2  
     
   chmod a+rw /var/log/freeradius/radius.log  

 

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

 

-----

Quellen/Source:

-
- find-geolocation-ip-address-commandline/
-
 ---- Add a comment
Icinga2 | the "original" by @watermelon (-->How to write a bash script wrapper (newbie script for ITL check_yum plugin) )
for the spez Plugin path --> Icinga2 | (spez)Plugins | define path
on Icinga2 (version: r2.9.1-1)
github.com/syswombat/icinga2/blob/master/apt-wrapper/check_apt_wrapper.sh




 steps on Icinga2
 1 #   cd /usr/lib/nagios/plugins
vi  /usr/lib/nagios/plugins/check_apt_wrapper.sh

wget https://raw.githubusercontent.com/syswombat/icinga2/master/apt-wrapper/check_apt_wrapper.sh

 

chmod +x check_apt_wrapper.sh
       
       
 b  vi  /etc/icinga2/zones.d/master/check_apt_update.conf
 

object CheckCommand "check_apt_updates2" {
            import "plugin-check-command"
            command = [ PluginDir + "/check_apt_wrapper.sh" ]

            arguments = {
                "-t" = 120
                "-s" = "off"
              }
 }

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

            check_command = "check_apt_updates"
            display_name = "apt Updates Information"

           assign where host.vars.os == "debian9"
 }

   
       
       
       
  #  icinga2 daemon -C    
  #  time systemctl reload icinga2    
  #  time systemctl restart icinga2    
  #   multitail /var/log/icinga2/icinga2.log    
c      
-
-
- - - -
Quellen/Source:
-  
-
-
-
-
-
-
- Add a comment

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: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:0A000152:SSL routines::unsafe legacy renegotiation disabled in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(): Failed to enable crypto in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(https://tools.cisco.com/security/center/psirtrss20/CiscoSecurityAdvisory.xml): failed to open stream: operation failed 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

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

We have 446 guests, one bot and no members online


one bot:
1 x BOT for JCE