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 #6714] add pagerduty notification documentation #1793

Closed
icinga-migration opened this issue Jul 12, 2014 · 3 comments
Closed
Labels
area/documentation End-user or developer help enhancement New feature or request
Milestone

Comments

@icinga-migration
Copy link

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

Created by mfriedrich on 2014-07-12 12:37:03 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2015-06-23 14:21:28 +00:00)
Target Version: 2.3.6
Last Update: 2015-06-23 14:21:28 +00:00 (in Redmine)

Backport?: Already backported

  • Requires an account to test
object NotificationCommand "notify-service-by-pagerduty" {
  import "plugin-notification-command"
  command = "/usr/local/bin/pagerduty_icinga.pl enqueue -f pd_nagios_object=service"

  env = {
    "CONTACTPAGER" = "$user.pager$"
    "NOTIFICATIONTYPE" = "$notification.type$"
    "SERVICEDESC" = "$service.name$"
    "HOSTNAME" = "$host.name$"
    "HOSTALIAS" = "$host.display_name$"
    "SERVICESTATE" = "$service.state$"
    "SERVICEOUTPUT" = "$service.output$"
  }
}

object NotificationCommand "notify-host-by-pagerduty" {
  import "plugin-notification-command"
  command = "/usr/local/bin/pagerduty_icinga.pl enqueue -f pd_nagios_object=host"

  env = {
    "CONTACTPAGER" = "$user.pager$"
    "NOTIFICATIONTYPE" = "$notification.type$"
    "HOSTNAME" = "$host.name$"
    "HOSTALIAS" = "$host.display_name$"
    "HOSTSTATE" = "$host.state$"
    "HOSTOUTPUT" = "$host.output$"
  }
}

object User "pagerduty" {
  display_name = "PagerDuty Notification User"
  pager = ""
}

apply Notification "pagerduty-service" to Service {
  command = "notify-service-by-pagerduty"
  states = [ OK, Warning, Critical, Unknown ]
  types = [ Problem, Acknowledgement, Recovery, Custom ]
  period = "24x7"
  users = [ "pagerduty" ]

  assign where service.vars.enable_pagerduty == true
}

apply Notification "pagerduty-host" to Host {
  command = "notify-host-by-pagerduty"
  states = [ Up, Down ]
  types = [ Problem, Acknowledgement, Recovery, Custom ]
  period = "24x7"
  users = [ "pagerduty" ]

  assign where host.vars.enable_pagerduty == true
}

object Service "pagerduty-test-service" {
  import "generic-service"
  check_command = "ping4"
  host_name = "pagerduty-test-host"

  vars.enable_pagerduty = true
}

object Host "pagerduty-test-host" {
  import "generic-host"
  address = "127.0.0.1"

  vars.enable_pagerduty = true
} 

Changesets

2015-06-23 14:21:07 +00:00 by (unknown) cc1bd53

Add notifications (e.g. pagerduty) to 'addons & plugins' docs

fixes #6714

2015-06-23 14:21:20 +00:00 by (unknown) b8bbff8

Add notifications (e.g. pagerduty) to 'addons & plugins' docs

fixes #6714

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-01-12 09:36:57 +00:00

  • Relates set to 5581

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-06-23 14:20:55 +00:00

  • Subject changed from add pagerduty notification example to add pagerduty notification documentation
  • Category changed from Configuration to Documentation
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 2.3.6
  • Estimated Hours set to 0.1
  • Backport? set to Yes

Pagerduty now has their own guide for icinga2, we can just link to that.

https://www.pagerduty.com/docs/guides/icinga2-integration-guide/

@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-06-23 14:21:28 +00:00

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

Applied in changeset cc1bd53.

@icinga-migration icinga-migration added enhancement New feature or request area/documentation End-user or developer help 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/documentation End-user or developer help enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant