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 #10245] Percent character whitespace on Windows #3454

Closed
icinga-migration opened this issue Sep 29, 2015 · 10 comments
Closed
Labels
bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by mfrosch on 2015-09-29 14:32:49 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2015-09-30 09:00:03 +00:00)
Target Version: 2.3.11
Last Update: 2015-10-13 10:04:53 +00:00 (in Redmine)

Icinga Version: 2.3.10
Backport?: Already backported
Include in Changelog: 1

NOTE: needs further evaluation!

I noticed an interesting escape that might happen on the Windows Agent.

The following vars get changed in the actual ran command, see below. A whitespace is added between the number and the unit of those percentage values, which leads NSClient to fail parsing the filter.

object CheckCommand "xx" {
  ...
  command = "\"C:\\Program Files (x86)\\ICINGA2\\nsclient++\\nscp.exe\" client -q checkcpu warn=\"$ARG1$\" time=\"$ARG2$\" warn=\"$ARG3$\" time=\"$ARG4$\" warn=\"$ARG5$\" time=\"$ARG6$\""
}

object Service "test" {
  ...
    vars = {
        ARG1 = "100%"
        ARG2 = "1m"
        ARG3 = "98%"
        ARG4 = "5m"
        ARG5 = "96%"
        ARG6 = "15m"
    }
}

    "last_check_result": {
        "active": true,
        "check_source": "fr00564vmx",
        "command": "\"C:\\Program Files (x86)\\ICINGA2\\nsclient++\\nscp.exe\" client -q checkcpu warn=\"100 %\" time=\"1m\" warn=\"98 %\" time=\"5m\" warn=\"96 %\" time=\"15m\"", 

Attachments

  • 10245.conf mfriedrich - 2015-09-29 15:33:21 +00:00

Changesets

2015-09-30 08:56:31 +00:00 by (unknown) 254c076

Fix incorrectly escaped arguments for CreateProcess

fixes #10245

2015-09-30 09:05:20 +00:00 by (unknown) 08ccb4e

Build fix

refs #10245

2015-10-13 10:03:25 +00:00 by (unknown) 1a638e3

Fix incorrectly escaped arguments for CreateProcess

fixes #10245

2015-10-13 10:04:28 +00:00 by (unknown) 32dcd10

Build fix

refs #10245

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-09-29 14:44:48 +00:00

Uhm. Your CheckCommand doesn't use any of the custom attributes as runtime macros.

@icinga-migration
Copy link
Author

Updated by mfrosch on 2015-09-29 15:03:19 +00:00

  • Description updated

Oh it does, forgot to replace in my copy/paste for example.

@icinga-migration
Copy link
Author

Updated by mfrosch on 2015-09-29 15:03:44 +00:00

  • Description updated

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-09-29 15:33:24 +00:00

  • File added 10245.conf
  • Category changed from Checker to libbase
  • Assigned to deleted mfrosch

On Linux, this isn't reproducible.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-09-30 08:15:07 +00:00

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

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-09-30 08:54:27 +00:00

  • Target Version set to 2.4.0

@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-09-30 09:00:03 +00:00

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

Applied in changeset 254c076.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-10-13 06:58:32 +00:00

  • Duplicates set to 10347

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-10-13 10:04:53 +00:00

  • Target Version changed from 2.4.0 to 2.3.11
  • Backport? changed from TBD to Yes

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-10-15 12:50:49 +00:00

  • Duplicated set to 9906

@icinga-migration icinga-migration added bug Something isn't working libbase labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.3.11 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant