> On 21 Feb 2017, at 11:43, René Koch <[email protected]> wrote: > > Hi list, > > I try to submit passive check results with NSClient++ and NRDP (testing an > alternative to NSCA). NRDP writes check results into checkresults directory, > so I enabled CheckResultReader for Icinga 2:
Hrm. I wouldn’t bother installing that “thing”, especially given that weird license - https://github.com/NagiosEnterprises/nrdp/blob/master/LICENSE.rst It’s more reasonable to push check results via Icinga 2 API, and as such a small handler could be used in i.e. Powershell or similar. Kind regards, Michael > > $ cat /etc/icinga2/conf.d/checkresults.conf > library "compat" > > object CheckResultReader "reader" { > spool_dir = "/run/icinga2/checkresults" > } > > The issue I face is following: > > [2017-02-21 11:39:10 +0100] critical/ThreadPool: Exception thrown in event > handler: > Error: Can't convert '' to a floating point number. > > (0) libcompat.so.2.6.2: <unknown function> (+0x66ea5) [0x7f412f0baea5] > (1) libcompat.so.2.6.2: <unknown function> (+0x674d2) [0x7f412f0bb4d2] > (2) libcompat.so.2.6.2: <unknown function> (+0x5c3aa) [0x7f412f0b03aa] > (3) libbase.so.2.6.2: icinga::Utility::Glob(icinga::String const&, > boost::function<void (icinga::String const&)> const&, int) (+0x282) > [0x7f414a374cd2] > (4) libcompat.so.2.6.2: <unknown function> (+0x6a33e) [0x7f412f0be33e] > (5) libbase.so.2.6.2: <unknown function> (+0x8be33) [0x7f414a331e33] > (6) libbase.so.2.6.2: icinga::Timer::Call() (+0x34) [0x7f414a373034] > (7) libbase.so.2.6.2: > icinga::ThreadPool::WorkerThread::ThreadProc(icinga::ThreadPool::Queue&) > (+0x36e) [0x7f414a3a6bbe] > (8) libboost_thread-mt.so.1.53.0: <unknown function> (+0xd27a) > [0x7f414ada527a] > (9) libpthread.so.0: <unknown function> (+0x7dc5) [0x7f4147af9dc5] > (10) libc.so.6: clone (+0x6d) [0x7f414782873d] > > > (0) Processing check result file '/run/icinga2/checkresults/c2hQUsx.ok' > (1) Processing check result files in '/run/icinga2/checkresults' > > The .ok file which Icinga 2 tries to process is empty, so the error messages > could make sense, but I'm wondering why Icinga 2 tries to open this file as > it should read the passive resutlts for file without ending .ok: > > $ ll /run/icinga2/checkresults/ > total 8 > -rwxrwx---. 1 apache icingacmd 350 Feb 21 11:38 c12zkw5 > -rw-r--r--. 1 apache icingacmd 0 Feb 21 11:38 c12zkw5.ok > -rwxrwx---. 1 apache icingacmd 352 Feb 21 11:38 cCBaXda > -rw-r--r--. 1 apache icingacmd 0 Feb 21 11:38 cCBaXda.ok > > Surprisingly it seems to work for results of hosts/services not defined in > Icinga 2 or at least the log entry is as expected: > > [2017-02-21 11:01:30 +0100] warning/CheckResultReader: Ignoring checkresult > file for host 'somehost': Host does not exist. > Context: > (0) Processing check result file > '/var/run/icinga2/checkresults/cECm8dh.ok' > (1) Processing check result files in '/var/run/icinga2/checkresults' > > > Icinga 2 version: icinga2-2.6.2-1.el7.centos.x86_64 > OS: Red Hat Enterprise Linux 7.3 > > The same setup (NSClient++ and NRDP) works fine with Icinga 1 > (icinga-1.14.0-0.el7.centos.x86_64) - Icinga 1 accepts results from > checkresults directory and processes it. > > Here are my Icinga 2 definition for this host, host template, service > template and the service itself: > > object Host "test-client01" { > import "windows-client" > } > > template Host "windows-client" { > import "generic-host" > > enable_active_checks = false > enable_passive_checks = true > > vars.os = "Windows" > } > > apply Service "Disk Space" { > import "passive-service" > assign where host.vars.os == "Windows" > } > > template Service "passive-service" { > enable_active_checks = true > enable_passive_checks = true > > check_command = "dummy" > vars.dummy_state = 3 > vars.dummy_text = "No Passive Check Result Received." > > max_check_attempts = 1 > retry_interval = 1m > check_interval = 30d > } > > > Thanks a lot for your help, > René > > > > _______________________________________________ > icinga-users mailing list > [email protected] > https://lists.icinga.org/mailman/listinfo/icinga-users _______________________________________________ icinga-users mailing list [email protected] https://lists.icinga.org/mailman/listinfo/icinga-users
