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 #9436] Functions can't be specified as command arguments #3074

Closed
icinga-migration opened this issue Jun 17, 2015 · 3 comments
Labels
area/notifications Notification events bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by vaisov on 2015-06-17 09:37:54 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2015-06-18 06:15:04 +00:00)
Target Version: 2.3.6
Last Update: 2015-06-18 12:07:24 +00:00 (in Redmine)

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

Here's full notification definition:

object NotificationCommand "notify-service-by-opsgenie" {
  import "plugin-notification-command"

  command = [ "/usr/bin/icinga2opsgenie" ]
  arguments = {
  "-entityType" = "service"
  "-t" = "$notification.type$"
  "-ldt" = "$icinga.long_date_time$"
  "-hn" = "$host.name$"
  "-hdn" = "$host.display_name$"
  "-hal" = "$host.display_name$"
  "-haddr" = "$host.address$"
  "-hs" = "$host.state$"
  "-hsi" = "$host.state_id$"
  "-lhs" = "$host.last_state$"
  "-lhsi" = "$host.last_state_id$"
  "-hst" = "$host.state_type$"
  "-ha" = "$host.check_attempt$"
  "-mha" = "$host.max_check_attempts$"
  "-hl" = "$host.latency$"
  "-het" = "$host.execution_time$"
  "-hds" = "$host.duration_sec$"
  "-hdt" = "$host.downtime_depth$"
  "-hgn" = "$host.group$"
  "-hgns" = {{ host.groups.join(",") }}
  "-lhc" = "$host.last_check$"
  "-lhsc" = "$host.last_state_change$"
  "-ho" = "$host.output$"
  "-hpd" = "$host.perfdata$"
  "-s" = "$service.name$"
  "-sdn" = "$service.display_name$"
  "-ss" = "$service.state$"
  "-ssi" = "$service.state_id$"
  "-lss" = "$service.last_state$"
  "-lssi" = "$service.last_state_id$"
  "-sst" = "$service.state_type$"
  "-sa" = "$service.check_attempt$"
  "-msa" = "$service.max_check_attempts$"
  "-sl" = "$service.latency$"
  "-set" = "$service.execution_time$"
  "-sds" = "$service.duration_sec$"
  "-sdt" = "$service.downtime_depth$"
  "-sgns" = {{ service.groups.join(",") }}
  "-lsch" = "$service.last_check$"
  "-lssc" = "$service.last_state_change$"
  "-so" = "$service.output$"
  "-spd" = "$service.perfdata$"
  "-tags" = {{ (service.groups + host.groups).join(",") }}
  }
}

which gives following error:

critical/config: Error: Invalid value: Object 'notify-host-by-opsgenie' (Type: 'NotificationCommand') at /etc/icinga2/master/notifications.conf:121 -> Key arguments -> Key -hgns
critical/config: Error: Invalid value: Object 'notify-service-by-opsgenie' (Type: 'NotificationCommand') at /etc/icinga2/master/notifications.conf:70 -> Key arguments -> Key -hgns
critical/config: 2 errors

Changesets

2015-06-18 06:13:40 +00:00 by (unknown) 9238c5a

Fix incorrect validator for command arguments

fixes #9436

2015-06-18 06:14:34 +00:00 by (unknown) 5771337

Fix incorrect validator for command arguments

fixes #9436
@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-06-18 06:15:04 +00:00

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

Applied in changeset 9238c5a.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-06-18 06:15:19 +00:00

  • Assigned to set to gbeutner
  • Target Version set to 2.3.6
  • Estimated Hours set to 0.5

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-06-18 12:07:24 +00:00

  • Subject changed from {{ host.groups.join(",") }} doesn't work to Functions can't be specified as command arguments

@icinga-migration icinga-migration added bug Something isn't working area/notifications Notification events 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/notifications Notification events bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant