Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
icinga-migration opened this issue Sep 16, 2016 · 8 comments
Closed
Milestone

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Sep 16, 2016

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 c81b4a8

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
Copy link
Member Author

@icinga-migration icinga-migration commented Sep 16, 2016

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.

mickem/nscp#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
Copy link
Member Author

@icinga-migration icinga-migration commented Sep 19, 2016

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

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich

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: mickem/nscp#326 (comment)

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Sep 21, 2016

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
Copy link
Member Author

@icinga-migration icinga-migration commented Sep 21, 2016

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
Copy link
Member Author

@icinga-migration icinga-migration commented Sep 21, 2016

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
Copy link
Member Author

@icinga-migration icinga-migration commented Sep 21, 2016

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

  • File added icinga2_nsclient_0.5.0_nscp_local_checks_icingaweb2.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"
    

    }

icinga2_nsclient_0.5.0_nscp_local_checks_icingaweb2.png

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Sep 21, 2016

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

  • Target Version set to 2.6.0
@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Sep 21, 2016

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

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset c81b4a8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.