Navigation Menu

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 #9456] Windows client w/ command_endpoint broken with $nscp_path$ and NscpPath detection #3088

Closed
icinga-migration opened this issue Jun 19, 2015 · 5 comments
Labels
area/distributed Distributed monitoring (master, satellites, clients) blocker Blocks a release or needs immediate attention bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by mfriedrich on 2015-06-19 11:14:25 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2015-06-19 13:25:03 +00:00)
Target Version: 2.3.6
Last Update: 2015-06-19 13:25:03 +00:00 (in Redmine)

Icinga Version: 2.3.5
Backport?: Not yet backported
Include in Changelog: 1

Problem

Original post: http://www.monitoring-portal.org/wbb/index.php?page=Thread&postID=217650#post217650

  • Windows client as command execution bridge and include

  • $nscp_path$ as runtime macro is calculated on the master which results in "."

**** calls {{ NscpPath }}

**** which calls dirname(msi_get_component_path("{5C45463A-4AE9-4325-96DB-6E239C034F93}"))

$ sudo icinga2 console
Icinga (version: v2.3.0-279-g7cd0077)
<1> => dirname(msi_get_component_path("{5C45463A-4AE9-4325-96DB-6E239C034F93}"))
"."
<2> => 
  • The runtime macros are sent to the remote client and override the local NscpPath macro (which is set as default, but gets overridden)
  • This results in ".\nscp.exe" being executed
[2015-06-18 10:27:03 W. Europe Daylight Time] warning/PluginCheckTask: Check command for object 'INTSRV.INT.LAN' (PID: 0, arguments: '".\nscp.exe" "client" "-a" "show-all" "-b" "-q" "check_windows_updates"') terminated with exit code 127, output: Command ".\nscp.exe" "client" "-a" "show-all" "-b" "-q" "check_windows_updates" failed to execute: 2, "The system cannot find the file specified."

Workaround

Set NscpPath in your constants.conf

const NscpPath = "C:\\Program Files\\NSClient++"

Changesets

2015-06-19 11:30:26 +00:00 by (unknown) 7083666

Fix wrong nscp path w/ command_endpoint runtime macros

Do not allow to override the nscp path by runtime macros.
This causes the (linux) master to send just "." as $nscp_path$
and the windows client ignores the local global constant NscpPath
being overridden by the master.

Only happens with command_endpoints where runtime macros are passed
from the master to the clients.

refs #9456

2015-06-19 13:20:22 +00:00 by (unknown) c1923c9

Fix wrong nscp path w/ command_endpoint runtime macros

Do not allow to override the nscp path by runtime macros.
This causes the (linux) master to send just "." as $nscp_path$
and the windows client ignores the local global constant NscpPath
being overridden by the master.

Only happens with command_endpoints where runtime macros are passed
from the master to the clients.

fixes #9456

2015-06-19 13:20:51 +00:00 by (unknown) 9e663ee

Fix wrong nscp path w/ command_endpoint runtime macros

Do not allow to override the nscp path by runtime macros.
This causes the (linux) master to send just "." as $nscp_path$
and the windows client ignores the local global constant NscpPath
being overridden by the master.

Only happens with command_endpoints where runtime macros are passed
from the master to the clients.

fixes #9456

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-06-19 11:15:34 +00:00

  • Description updated

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-06-19 11:33:05 +00:00

$nscp_path$ as runtime macro is causing problems, and I've therefore removed it entirely. The previous implementation in 62c755f was correct about this, only allowing the local global constant.

I've pushed a fix into a git branch, testers may just patch their itl/command-nscp-local.conf file on the Windows host.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-06-19 11:33:38 +00:00

  • Relates set to 9256

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-06-19 13:21:46 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Estimated Hours set to 2

Tested working by Lennart, thanks.

@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-06-19 13:25:03 +00:00

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

Applied in changeset c1923c9.

@icinga-migration icinga-migration added blocker Blocks a release or needs immediate attention bug Something isn't working area/distributed Distributed monitoring (master, satellites, clients) labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.3.6 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/distributed Distributed monitoring (master, satellites, clients) blocker Blocks a release or needs immediate attention bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant