Quantcast
Channel: PagerDuty Community - Latest topics
Viewing all 1569 articles
Browse latest View live

PagerDuty REST API curl shorthand: a secure bash alias

$
0
0

@demitri wrote:

Or: how to make quick and easy REST API requests from the command line

I often find myself needing to make various requests to the PagerDuty REST API to test and try things out. All the better when I can do it from the command line, because then it’s just a matter of piping the response to JQ to be able to pretty-print/pick apart/search through responses, or use the output to perform additional actions.

The following lives in a file sourced from my ~/.profile :

apicurl='curl -H "Accept: application/vnd.pagerduty+json;version=2;charset=utf8" -H "Content-Type: application/json;charset=utf8" -H "From: your-email-here@example.com"  '
# ...
alias pdtestcurl="$apicurl "'-H "Authorization: Token token=`gpg2 -d ~/path/to/your/api/key.asc`"'

The first part of the alias is declared as a variable to allow its reuse in other similar aliases that use other tokens for running API calls in other test accounts.

Example: get the user ID of a user matching a particular email address:

pdtestcurl 'https://api.pagerduty.com/users?query=user.mcuserson@example.com' | jq '.users[].id'

Notes/prerequisites:

  • You’ll need to have GPG2 installed, and store your API key in a PGP-encrypted file somewhere, and then put the path to it in the bash alias. Moreover, you’ll need a private key for decrypting the file set up.
  • If you trust the security of your system enough to leave plain text API keys on the file system, you can replace the command substitution part with simply cat [path-to-file] Don’t do this please; it’s a terrible idea :slight_smile:
  • Using single quotes around the part of the alias containing the command substitution prevents the command from running at the time that the alias is declared, so that the API key isn’t floating around in plain text inside of the alias definition.
  • Assuming you protect the private key with a passphrase: after a certain amount of time not using the alias (or your PGP key in general), you’ll be prompted to reenter your passphrase via pinentry. It’s like having one password to securely access your API keys.

Posts: 1

Participants: 1

Read full topic


v2 REST API - Incident pagination issue

$
0
0

@milay wrote:

I am using Python in order to query the pagerduty API for historic incidents. I have no issues receiving a response containing incidents, however, paging is not functioning as expected.

For testing purposes I have limited the number of cases returned & set the limit 2. Below it is clear each page is returns 1 new case when 2 new cases are expected. I can set the limit to 5 or 100 & a single new case will be returned, followed by the previously returned cases -1. Is this a known issue? Is it possible to workaround the issues in some way?

Python code:

import requests
import json
import time

def get_incidents(offset):
url = ‘https://api.pagerduty.com/incidents?since=2018-05-18%2000%3A00&until=2018-05-19%2000%3A00&statuses[]=triggered&statuses[]=acknowledged&statuses[]=resolved&service_ids[]=<some_service>&time_zone=America%2FChicago&limit=2&total=true&offset=’+str(offset)
headers = {“Accept”: “application/vnd.pagerduty+json;version=2”, “Authorization”: “Token token=<some_token>”}
response = requests.get(url, headers=headers)
page = response.json()[‘more’]
#print response.json()
incidents = response.json()[‘incidents’]
for incident in incidents:
#print “%s,%s,%s,%s” % (incident[‘created_at’], incident[‘incident_number’] , incident[‘description’], incident[‘html_url’])
print “%s,%s” % (incident[‘created_at’], incident[‘incident_number’])
return page

offset = 0
page = get_incidents(offset)
while page == True:
print “Offset:”,str(offset)
print “More:”,str(page)
offset = offset + 1
time.sleep(4)
page = get_incidents(offset)
else:
print page
exit

Results:

2018-05-18T00:16:37-05:00,360080
2018-05-18T02:32:23-05:00,360110
Offset: 0
More: True
2018-05-18T02:32:23-05:00,360110
2018-05-18T10:04:27-05:00,360242
Offset: 1
More: True
2018-05-18T10:04:27-05:00,360242
2018-05-18T10:04:33-05:00,360243
Offset: 2
More: True
2018-05-18T10:04:33-05:00,360243
2018-05-18T10:39:13-05:00,360259
Offset: 3
More: True
2018-05-18T10:39:13-05:00,360259
2018-05-18T11:07:21-05:00,360267
Offset: 4
More: True
2018-05-18T11:07:21-05:00,360267
2018-05-18T12:04:38-05:00,360286
Offset: 5
More: True
2018-05-18T12:04:38-05:00,360286
2018-05-18T12:35:47-05:00,360305
Offset: 6
More: True
2018-05-18T12:35:47-05:00,360305
2018-05-18T12:40:52-05:00,360307
Offset: 7
More: True
2018-05-18T12:40:52-05:00,360307
2018-05-18T14:15:11-05:00,360362
Offset: 8
More: True
2018-05-18T14:15:11-05:00,360362
2018-05-18T16:43:05-05:00,360431
Offset: 9
More: True
2018-05-18T16:43:05-05:00,360431
2018-05-18T16:44:53-05:00,360432
False

Posts: 1

Participants: 1

Read full topic

Delay escalation for set time period

$
0
0

@jgcg wrote:

Hi,

We’re looking at integrating various services with PagerDuty, however, we have a requirement where certain services (Nagios, for example) are only to be escalated after an alert has been up for 30 minutes or longer as a good percentage of our alerts can resolve within this time frame and we have a fair few false positivies (monitored 600+hosts with 3000+ service checks).

Is there a way to accomodate for this requirement without amending the Nagios environment?
Looking at the escalation policies it seems you can only set ‘Immediately after an incident is triggered’.

I was thinking about setting a dummy contact up which is notified first, then setting the delay of 30 minutes to escalate on, however, I think with this, if a team re-assigns an alert to another, the 30 minute window would kick in again?

Thanks.

Posts: 1

Participants: 1

Read full topic

Operations Command Console

$
0
0

@LordGee wrote:

Hi,

I’m interested in the Operations Command Console and how status of infrastructure/services/applications is retrieved to be presented in the console, however the public documentation on the console is quite vague on the subject and doesn’t provide any details on how this information can be collected.

Does PagerDuty allow for Health Status information from AppDynamics to be used to populate the status of infrastructure/applications, and that even without a status change event?
In the same line of question, is it possible to present business transaction response times coming from Sumo Logic into the console?

How would something like this be configured?

Posts: 1

Participants: 1

Read full topic

How can I delay notification while I wait to see if it resolves?

$
0
0

@EricHoltman wrote:

We have a system using Solarwinds that does health checks on our app every five minutes.

When we get a “Down” event, I’d like to trigger a PagerDuty alert. We have all that set up and working. But we get occasional false alerts, which resolve the next time (five minutes later).

I’d like to set up the notifcations to trigger the alert, but not start the call chain for 10 minutes. If the “Up” email arrives, we’d auto-resolve the event, and no one has to wake up.

How can we get that to happen? I can’t figure out how to insert a step in the escalation policy to “do nothing for ten minutes”

Posts: 2

Participants: 1

Read full topic

GDPR Compliance

$
0
0

@jcurreee wrote:

In case you haven’t heard of GDPR by now: Welcome to the internet! We’re glad to have you with us :slight_smile:

GDPR goes into effect shortly, and we’ve set up a new web page - pagerduty.com/gdpr - to let you know where PagerDuty stands with GDPR compliance. You should expect additional updates to the site as time goes on, since GDPR is not just a one-time event.

Let us know if you have any questions!

Posts: 1

Participants: 1

Read full topic

Rotating a schedule between other schedules

$
0
0

@Dave_Smith wrote:

I have a service that is supported by multiple feature teams, each of which has a rotation of it’s own. Rather than create a new schedule for this service, I would like to rotate it weekly between the schedules of the of the existing teams. I’ve created a new escalation policy and schedule for this service, but it looks like the schedules only support adding individual users, rather than other schedules. Is that possible?

Posts: 1

Participants: 1

Read full topic

Process Flow or Infographic For PagerDuty

$
0
0

@DanFoxley wrote:

Is there an infographic or process flow for PagerDuty? There are lots of twists and turns when setting up services, users, and notifications and it would be nice to see it in one graphic.

Dan

Posts: 2

Participants: 1

Read full topic


Bad A-Type Record for Events API

$
0
0

@BenMain wrote:

Is the 104.210.60.176 address producing problems for anyone else. That IP seems unreachable. events.pagerduty.com is round-robining at DNS, and that address is causing failures when we are trying to write failures to the Events API.

|events.gslb.pagerduty.com|IN|A|104.210.60.176|29s|(00:00:29)|
|events.gslb.pagerduty.com|IN|A|52.53.154.170|29s|(00:00:29)|
|events.gslb.pagerduty.com|IN|A|54.245.165.68|29s|(00:00:29)|
|events.gslb.pagerduty.com|IN|A|54.203.47.92|29s|(00:00:29)|
|events.gslb.pagerduty.com|IN|A|13.56.226.208|29s|(00:00:29)|

Posts: 2

Participants: 1

Read full topic

Help needed in using PagerDuty as an alerts-hub.

$
0
0

@sapien wrote:

Hi all,

I am planning a shift in the alerts management process in my organization and I would like to share my plan on using PagerDuty and get some feedback.

Please let me know if you identify holes in the plan, or anything that might be difficult to accomplish, or if you have any suggestions.

Of course, I’m open to answer any questions.


My current solution for managing alerts from various sources

We have monitoring setups in NewRelic, Pingdom, Anodot, Grafana, Sensu and Sentry systems.
Most alerts in these systems are configured to notify a specific Slack channel.
For example, a NewRelic alert “Slow Response Time” is configured to notify #pengiuns-team channel in Slack.

Our internal Slack bot is identifying when these alert messages are sent to Slack, writes them to a database “as is” and adds response buttons(‘Acknowledge’, ‘Resolve’) to these Slack messages. Once somebody clicks one of the buttons, we update the entry in our database.
Our database is queried by our internal status page for reflection of production.

We have ~800 potential responders to alerts.

Problems with the current solution
  • Alerts data coming from the monitoring systems is not processed well and saved “as is” (Slack message format), thus, performing analysis on these alerts is very difficult.
  • The solution relies on the availability of Slack.
  • Missing a standard way to setup alerts.
  • Other issues…

Goals:

  • Stop using the solution described above, replacing it with a more robust, extendable and resilient one.
  • Route all the alerts directly to PagerDuty, and from there to the appropriate Slack channels.
  • Not escalating at this point (due a bad signal/noise ratio).
  • Be able to query and analyze the alerts in real time to reflect production in a Status Page.
  • Every slack user in the organization can respond to the alerts (by clicking the “Ack” or “Ignore” buttons).

The Plan

Per each service, use the monitoring system API to:

  1. Find all the alerts that are routed directly to a specific Slack channel.
  2. Re-route these alerts to PagerDuty using the integration key created for the service.
  3. Create a polling mechanism to query PagerDuty about active alerts.

Waiting to read your thoughts and ideas.

Thanks,
Dima

Posts: 4

Participants: 3

Read full topic

Adding Responders via Slack

Send Alerts based on Alert Level(High,Low) and time of day

$
0
0

@Gregory_Cooper wrote:

How can we change up PagerDuty so that we can send lower priority alerts to it that won’t get paged in the middle of the night? We want something we can reuse for different kinds of alerts that belong in this category.

Example:
Alert Y - Only page for old items during normal business hours on weekdays. Continue paging for high item count 24x7.

Posts: 2

Participants: 1

Read full topic

Override system volume Android 8.1

$
0
0

@kerrermanisNL wrote:

Hi there,

Searched around a little on the forum and tried checking some of the docs linked to in the “About the Using PagerDuty category” thread, but couldn’t really find anything related to this. I did find and issue on Google Discussion here. But that one got closed because of being a duplicate, but the thread that’s linked to is a real mess in which I couldn’t find anything similar.

So, to the issue. When I try to use the “Override system volume” function on the PagerDuty app on my phone (OnePlus 5) which is running Android 8.1 I can’t get it to work. I have given the app permission to allow overriding system volume, but I just can’t get it to work. I do receive the notification from the app, but there’s no sound. Is anyone experiencing similar problems and do you perhaps have a fix? It’s quite annoying to have to take my phone out of “silent” mode and allow myself to get notified by all and any applications :frowning:

Thanks in advance, and sorry if this is a duplicate.

Posts: 2

Participants: 1

Read full topic

How to pass config data when creating an extension.

$
0
0

@AnthonyHobbs wrote:

I’m trying to create Slack extensions using the API. I would like to re-use the slack access_token information (they all go to the same channel, as the same user). However that information is in the “config” section of the extension which doesn’t appear to be a parameter in the api https://v2.developer.pagerduty.com/page/api-reference#!/Extensions/post_extensions

Is there a way to do this or am I stuck with manually going to the website to finish the configuration of these extension?

Thanks,
Anthony

Posts: 3

Participants: 2

Read full topic

Live PD 101 Training (recording)

$
0
0

@hailey wrote:

Every other Wednesday at 10 a.m. PT, the PagerDuty Success team leads a live PD 101 training to give new managers and responders an opportunity to learn PagerDuty best practices and ensure that you’re set up for success.

Below is a recent recording to check out. If you’d like to attend one of our next live trainings, sign up here.

Who should attend?

  • Incident responders
  • Admins/managers
  • Account owners
  • New Users
  • Customers
  • Folks in a trial

What’s covered?

  • Invite users to your account
  • Create schedules and overrides
  • Set up escalation policies
  • Configure services and integrations
  • Utilize extensions and API access keys
  • Add teams
  • Respond to incidents
  • Manage user profiles

Previously Recording Training:

Posts: 1

Participants: 1

Read full topic


Getting Started with Event Intelligence

$
0
0

@hailey wrote:

With PagerDuty Event Intelligence, we’re bringing you the ability to keep pace with increasing infrastructure complexity, and the volumes of event data that come with it.

  • Routing and Workflow Automation: Programmatically manage large volumes of event data from 200+ tools
  • Intelligent Alert Correlation: Applied machine learning and rules-based approaches automatically group related issues across complex systems into a single incident, reducing noise while centralizing critical context to speed triage.
  • Similar Incidents: See past related issues automatically embedded within incidents to improve triage.
  • Noise Suppression: Prevent notification of non-actionable events while still retaining data for forensic analysis

Posts: 1

Participants: 1

Read full topic

How to change linked account

$
0
0

@rcdeoliveira wrote:

Hi everyone!

I just configured PagerDuty and Slack integration, it’s amazing! But I have a little issue: I have access to PagerDuty with two accounts, one of them as admin and another one as operator, when I received the first slack notification I clicked it to link the accounts and I had active my PagerDuty admin account, now I want to change the association to my operator account but I can’t find where do it or reset it. Does anyone knows how to do it?

Thanks.

Posts: 1

Participants: 1

Read full topic

Retain Incident responder in 'Assigned to' column in Incidents

$
0
0

@GavinClark wrote:

Currently in PagerDuty when an Incident is resolved, whoever the Incident was assigned to is cleared out. Is there a way to keep that information available in the Incident view? If I have questions about an incident, I have to go into the incident and then look at the timeline. This is fine for a singular incident, but if I need to get in touch with the responders of multiple incidents this can be cumbersome.

Is there a way to keep who it was assigned to in the Incidents view, i.e. not blank out the responder after it is resolved? If not, is there a way to request this a feature?

Thank you in advance,
-Gavin

Posts: 2

Participants: 1

Read full topic

Andrew Marshall, doin' my duty

$
0
0

@andrew.marshall wrote:

Howdy y’all. Andrew Marshall here, visiting from Portland, OR. I’m the newish Director of Product Marketing - Partner Ecosystem. I’ll be working with some of our strategic partners to help drive the PagerDuty platform through their massive user bases. Very excited to be here and meet you all!

Go Blazers, Sounders FC, Washington Huskies, and US MNT (ugh) and WNT Soccer teams!

Posts: 1

Participants: 1

Read full topic

Amani Shoman here - Quick intro

$
0
0

@ashoman wrote:

Hi Team! I’ve just joined PagerDuty as a Sr HR Business Partner, part of the People (PTV) Team! Looking forward to getting to know and working with you all!

Posts: 1

Participants: 1

Read full topic

Viewing all 1569 articles
Browse latest View live