Tool to create configuration of icinga2 for passive windows checks(for using with nsclient++)
<?xml version="1.0" encoding="UTF-16"?>
<CONFIG>
<monserver>
<interval>2</interval>
<adresse>monitoring.server.local</adresse>
<password>NSCAPASS</password>
</monserver>
<konfiguration>
<htemplate>passive-host</htemplate>
<stemplate>passive-service</stemplate>
<hgruppe>HOSTGROUP</hgruppe>
<sgruppe>SERVICEGROUP</sgruppe>
</konfiguration>
</CONFIG>
interval - specifying how many times the data should be sent (min) address - url/ip of monitoring server password - password of nsca service on monitoring server htemplate - name of passive host template on icinga2 stemplate - name of passvie service template on icinga2 hgruppe - host group name on icinga2 server sgruppe - service group name on icinga2 server
template Host "passive-host" {
max_check_attempts = 2
check_interval = 300s
retry_interval = 200s
enable_active_checks = true
enable_passive_checks = true
check_command = "passive"
vars.notification["mail"] = {
groups = [ "icingaadmins" ]
}
}
template Service "passive-service" {
max_check_attempts = 2
check_interval = 3m
retry_interval = 0
enable_active_checks = true
check_command = "passive"
vars.notification["mail"] = {
groups = [ "icingaadmins" ]
}
}
object Host "4demo" {
import "passive-host"
display_name = "4demo Server Host"
vars.group = "test"
}
object Service "CPU" {
import "passive-service"
host_name ="4demo"
vars.group ="test"
}
object Service "Festplatten" {
import "passive-service"
host_name ="4demo"
vars.group ="test"
}
object Service "Arbeitsspeicher" {
import "passive-service"
host_name ="4demo"
vars.group ="test"
}
This file contains all ressources, which you can select to monitor
Here will be descript, which services contain this file
win - Windows service
eve - Eventlog
Module to activated in nsclient++
Time to resend state of a service
-
Add winDHCP in Segment
-
Add Service
##winDHCP ;DHCP Service DHCPServer:Windows_Dienst_DHCP_Server
##winDHCP - define (win) that it is a windows service ;DHCP Service - description of service, this will be write in nsclient.ini as comment DHCPServer - Name of service in Windows Windows_Dienst_DHCP_Server - Name of service in icinga (Display Name)
-
Add Eventlog
##EveIDDHCP ;EveIDDHCP 10020:system:1:10:20:DHCP_Dyn._IP
##EveIDDHCP - Name of Segment - eve define that it is a eventlog ;EveIDDHCP - comment in nslcient.ini 10020 - Eventlog id system - type of eventlog (application, system, security) 1 - warn 10 - critical 20 - show last 20min. DHCP_Dyn._IP - Name of service in icinga (Display Name). You can use a name with space
- Edit config.xml (show below)
- Start tool
- Select folder with config.xml and source.txt
- Write host name and display host name
- Select service to monitoring
- Check checkbox if you will generate icinga2 configuration file
- Copy nsclient.ini in nsclient++ folder and restart nsclient++
- Copy servername.conf file in icinga2 server and reload/restart icinga2 configuration.