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 #12799] Log Macro warnings for command arguments? #4690

Closed
icinga-migration opened this issue Sep 26, 2016 · 2 comments
Closed
Labels
area/log Logging related enhancement New feature or request

Comments

@icinga-migration
Copy link

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

Created by mfrosch on 2016-09-26 11:42:33 +00:00

Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-09-26 11:42:41 +00:00 (in Redmine)

Backport?: Not yet backported
Include in Changelog: 1

We encountered an interesting problem regarding macro resolving in command arguments.

When a macro for an argument can not be resolved, or macros in the macro, the full argument is dropped. Here is an example with a typo in "notifcation".

The problem is that we can't really log an error about it at the moment, because this would log an error for every argument that is not used/present.

Is there a way to properly tell the user the macro is invalid?

object NotificationCommand "sms-service-notification" {
  import "plugin-notification-command"

  command = [ SysconfDir + "/icinga2/scripts/sendsms.pl" ]

  arguments = {
    //...
    "-m" = {
      value = "$sms_service_message$"
    }
  }

  //...
  vars.sms_service_message = "$notifcation.type$: $host.name$ - $service.name$ is $service.state$: $service.output$"
}
@icinga-migration
Copy link
Author

Updated by mfrosch on 2016-09-26 11:42:41 +00:00

  • Priority changed from Normal to Low

@icinga-migration icinga-migration added Low enhancement New feature or request labels Jan 17, 2017
@dnsmichi dnsmichi added the area/log Logging related label Feb 8, 2017
@gunnarbeutner
Copy link
Contributor

I don't think there's anything we can do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/log Logging related enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants