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 #12953] Problems executing external commands with name or directory begins with "n" #4742

Closed
icinga-migration opened this issue Oct 21, 2016 · 5 comments
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working

Comments

@icinga-migration
Copy link

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

Created by Emanuel on 2016-10-21 11:28:12 +00:00

Assignee: Emanuel
Status: Closed (closed on 2016-12-07 21:31:14 +00:00)
Target Version: (none)
Last Update: 2016-12-07 21:31:14 +00:00 (in Redmine)

Icinga Version: 2.5.4

Hello,

we currently have two (out of 2000) servers that can not execute a command like:

"C:​\Program Files (x86)​\ICINGA2\nsclient**\nscp.​exe"

only those complain: "The system cannot find the file specified.​"

C:​\Program Files (x86)​\ICINGA2
sclient**
scp.​exe"

Configfile looks like:

object CheckCommand "check_win_cpu" {
import "generic-type-command"
command = "\"C:\\Program Files (x86)\\ICINGA2\\nsclient**\\nscp.exe\" client --log critical -q check_cpu filter=none \"warn=kernel > 10 or load > 80\" \"crit=load > 90\""
}

@icinga-migration
Copy link
Author

Updated by Emanuel on 2016-10-21 11:44:34 +00:00

Version running at the Satellite and agent: 2.5.4

@icinga-migration
Copy link
Author

Updated by twidhalm on 2016-10-21 14:45:54 +00:00

Hi,

Emanuel just told me about this issue. He put it into the wrong queue by accident. Since I don't have sufficient permissions, please move it to the appropriate queue.

Cheers,
Thomas

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-10-21 16:32:38 +00:00

  • Project changed from Director to Icinga 2
  • Icinga Version set to 2

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-11-11 14:53:12 +00:00

  • Category set to Configuration
  • Status changed from New to Feedback
  • Assigned to set to Emanuel

\n will result in a new line when executed. The command line is lacking proper escape sequences for \.

Try

command = "\"C:\\\\Program Files (x86)\\\\ICINGA2\\\\nsclient++\\\\nscp.exe\" client 

Apart from that it is reasonable to use the existing nscp commands, or at least let the client figure out the path to the binary on its own (command = [ NscpPath + "\\nscp.exe", "client" ]).

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-12-07 21:31:14 +00:00

  • Status changed from Feedback to Closed

@icinga-migration icinga-migration added bug Something isn't working area/configuration DSL, parser, compiler, error handling labels Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant