Icinga / icinga2

The core of our monitoring platform with a powerful configuration language and REST API.
https://icinga.com/docs/icinga2/latest
GNU General Public License v2.0
1.99k stars 570 forks source link

[dev.icinga.com #12733] Windows Installer should include NSClient++ 0.5.0 #4671

Closed icinga-migration closed 7 years ago

icinga-migration commented 7 years ago

This issue has been migrated from Redmine: https://dev.icinga.com/issues/12733

Created by mfriedrich on 2016-09-16 07:22:01 +00:00

Assignee: mfriedrich Status: Resolved (closed on 2016-09-21 14:25:04 +00:00) Target Version: 2.6.0 Last Update: 2016-09-21 14:25:04 +00:00 (in Redmine)

Backport?: Not yet backported
Include in Changelog: 1

There are some breaking changes mentioned in the changelog, we should test them with the local ITL CheckCommands beforehand. https://docs.nsclient.org/whatsnew/0.5.0.html

Furthermore 0.5.0 provides a REST API which could maybe used for querying the running service for additional metrics. Discuss and open a follow-up issue if necessary.

Attachments

Changesets

2016-09-21 13:28:20 +00:00 by mfriedrich c81b4a82ddad85ddee6b04b2599126aa09098ef6

Upgrade NSClient++ to 0.5.0 stable

This involves required changes in the nscp-local ITL CheckCommand
definitions. Upgrading NSClient++ therefore requires updating
the Icinga 2 Windows client as well.

fixes #12733
icinga-migration commented 7 years ago

Updated by mfriedrich on 2016-09-16 19:51:40 +00:00

NSClient** 0.5.0 crashes when used with "nscp.exe client" queries. I've opened an issue, this happened somewhere in between RC1 and 0.5.0 stable.

https://github.com/mickem/nscp/issues/326

INF: Detected crash.​..
INF: Running: "C:​\Program Files\NSClient++\reporter.​exe" "archive" "C:​\WINDOWS\SERVIC~2\NETWOR~1\AppData\Local\Temp\\37900698-​dc1d-​45c7-​a0f2-​2defd6a05041.​dmp" "NSClient++" "0.​5.0.​62" "2016-​09-​14" "C:​\Program Files\NSClient++/crash-​dumps"

boost:​:filesystem:​:copy_​file: Zugriff verweigert: "C:​\WINDOWS\SERVIC~2\NETWOR~1\AppData\Local\Temp\\37900698-​dc1d-​45c7-​a0f2-​2defd6a05041.​dmp", "C:​\Program Files\NSClient++/crash-​dumps\37900698-​dc1d-​45c7-​a0f2-​2defd6a05041.​dmp"

ERR: Failed to check service state

INF: Running: "C:​\Program Files\NSClient++\reporter.​exe" "restart" "NSCP"

Analysing this further, the following command line is executed which leads into a crash (which apparently attempts to restart the Windows service).

"command": [
"C:\\Program Files\\NSClient++\\nscp.exe",
"client",
"--critical",
"used > 90",
"--load-all",
"--log",
"critical",
"--show-all",
"--warning",
"used > 80",
"-b",
"-q",
"check_drivesize"
],
"execution_end": 1474038646.88,
"execution_start": 1474038645.161,
"exit_status": -532462766,
"output": "INF: Detected crash...\n\nINF: Running: \"C:\\Program Files\\NSClient++\\reporter.exe\" \"archive\" \"C:\\WINDOWS\\SERVIC~2\\NETWOR~1\\AppData\\Local\\Temp\\\\9ab1bc38-8286-4e3f-851a-d600a7fa53a1.dmp\" \"NSClient++\" \"0.5.0.62\" \"2016-09-14\" \"C:\\Program Files\\NSClient++/crash-dumps\"\n\nboost::filesystem::copy_file: Zugriff verweigert: \"C:\\WINDOWS\\SERVIC~2\\NETWOR~1\\AppData\\Local\\Temp\\\\9ab1bc38-8286-4e3f-851a-d600a7fa53a1.dmp\", \"C:\\Program Files\\NSClient++/crash-dumps\\9ab1bc38-8286-4e3f-851a-d600a7fa53a1.dmp\"\n\nERR: Failed to check service state\n\nINF: Running: \"C:\\Program Files\\NSClient++\\reporter.exe\" \"restart\" \"NSCP\"",
icinga-migration commented 7 years ago

Updated by mfriedrich on 2016-09-19 09:02:59 +00:00

Update - the "--load-all" flag is not necessary (it also slows down check execution) and probably causes trouble with .NET or the webserver module. Michael kindly responded to my bug report: https://github.com/mickem/nscp/issues/326#issuecomment-247794403

icinga-migration commented 7 years ago

Updated by mfriedrich on 2016-09-21 12:04:07 +00:00

"perf-syntax=foo" does not work anymore. That's supposed to change in nscp-local-counter.

icinga-migration commented 7 years ago

Updated by mfriedrich on 2016-09-21 12:41:15 +00:00

All checks except "local-disk" and "local-version" require the module CheckSystem. The latter require CheckDisk and CheckNSCP as modules.

icinga-migration commented 7 years ago

Updated by mfriedrich on 2016-09-21 13:22:00 +00:00

Ok, it is CheckHelpers for local-version. https://docs.nsclient.org/reference/check/CheckHelpers.html#CheckHelpers.check\_version

icinga-migration commented 7 years ago

Updated by mfriedrich on 2016-09-21 13:32:20 +00:00

icinga2_nsclient_0.5.0_nscp_local_checks_icingaweb2.png

icinga-migration commented 7 years ago

Updated by mfriedrich on 2016-09-21 14:01:29 +00:00

icinga-migration commented 7 years ago

Updated by mfriedrich on 2016-09-21 14:25:04 +00:00

Applied in changeset c81b4a82ddad85ddee6b04b2599126aa09098ef6.