Closed icinga-migration closed 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\"",
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
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.
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.
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
Updated by mfriedrich on 2016-09-21 13:32:20 +00:00
File added _icinga2_nsclient_0.5.0_nscp_local_checksicingaweb2.png
object Host "DESKTOP-IHRPO96" { address = "10.0.10.36"
check_command = "hostalive"
vars.client_endpoint = name
vars.os_type = "windows" vars.os_version = "10"
//nsclient++ 0.5.0 vars.nscp_boot = false }
/ CPU / apply Service "nscp-local-cpu" { check_command = "nscp-local-cpu" command_endpoint = host.vars.client_endpoint
vars.nscp_cpu_showall = true
assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
/ Memory / apply Service "nscp-local-memory" { check_command = "nscp-local-memory" command_endpoint = host.vars.client_endpoint
vars.nscp_memory_showall = true
assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
/ OS Version / apply Service "nscp-local-os-version" { check_command = "nscp-local-os-version" command_endpoint = host.vars.client_endpoint
//no nscp_*_showall assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
/ Pagefile / apply Service "nscp-local-pagefile" { check_command = "nscp-local-pagefile" command_endpoint = host.vars.client_endpoint
vars.nscp_showall = true
assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
/ Process / apply Service "nscp-local-process" { check_command = "nscp-local-process" command_endpoint = host.vars.client_endpoint
vars.nscp_showall = true
assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
/ Services / apply Service "nscp-local-service-security-center" { check_command = "nscp-local-service" command_endpoint = host.vars.client_endpoint
vars.nscp_service_name = "wscsvc" //security center
assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
apply Service "nscp-local-services" { check_command = "nscp-local-service" command_endpoint = host.vars.client_endpoint
vars.nscp_service_arguments = [ "exclude=sppsvc", "exclude=ShellHWDetection" ]
vars.nscp_showall = false
assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
/ Uptime / apply Service "nscp-local-uptime" { check_command = "nscp-local-uptime" command_endpoint = host.vars.client_endpoint
vars.nscp_showall = true
assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
/ Version / apply Service "nscp-local-version" { check_command = "nscp-local-version" command_endpoint = host.vars.client_endpoint
assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
/ Disk / apply Service "nscp-local-disk" { check_command = "nscp-local-disk" command_endpoint = host.vars.client_endpoint
vars.nscp_disk_showall = true
assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
apply Service "nscp-local-disk-C" { check_command = "nscp-local-disk" command_endpoint = host.vars.client_endpoint
vars.nscp_disk_showall = true vars.nscp_disk_drive = "C"
assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
/ Performance counters / //TODO make generic apply-for rule apply Service "nscp-local-counter-cpu" { check_command = "nscp-local-counter" command_endpoint = host.vars.client_endpoint
vars.nscp_counter_name = "\Processor(_total)\% Processor Time" vars.nscp_counter_perfsyntax = "Total Processor Time" vars.nscp_counter_warning = 1 vars.nscp_counter_critical = 5
vars.nscp_counter_showall = true
assign where host.vars.client_endpoint && host.vars.os_type == "windows" }
Updated by mfriedrich on 2016-09-21 14:01:29 +00:00
Updated by mfriedrich on 2016-09-21 14:25:04 +00:00
Applied in changeset c81b4a82ddad85ddee6b04b2599126aa09098ef6.
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)
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