pagerduty_service
¶
Manage PagerDuty services
Escalation policies can be referenced by pagerduty ID or by namea.
For example:
ensure test service
pagerduty_service.present:
- name: 'my service'
- escalation_policy_id: 'my escalation policy'
- type: nagios
- saltext.pagerduty.states.pagerduty_service.__virtual__()[source]¶
Only load if the pygerduty module is available in __salt__
- saltext.pagerduty.states.pagerduty_service.present(profile='pagerduty', subdomain=None, api_key=None, **kwargs)[source]¶
Ensure pagerduty service exists. This method accepts as arguments everything defined in https://developer.pagerduty.com/documentation/rest/services/create
Note that many arguments are mutually exclusive, depending on the “type” argument.
Examples:
# create a PagerDuty email service at test-email@DOMAIN.pagerduty.com ensure generic email service exists: pagerduty_service.present: - name: my email service - service: description: "email service controlled by salt" escalation_policy_id: "my escalation policy" type: "generic_email" service_key: "test-email"
# create a pagerduty service using cloudwatch integration ensure my cloudwatch service exists: pagerduty_service.present: - name: my cloudwatch service - service: escalation_policy_id: "my escalation policy" type: aws_cloudwatch description: "my cloudwatch service controlled by salt"