Comments (10)
Actually no, the number that I want is editable on PagerDuty and you can apply any value there. Seems PD does not provide that value via API. 😐
I think we can close this issue as PD does not support that.
from incubator-devlake.
I see.
I am closing the issue for now, feel free to reopen it if things have changed.
from incubator-devlake.
It sounds good to me, we are open to PRs that implement the feature.
from incubator-devlake.
Hi, are you referring to a Grafana dashboard? If so, you are free to do so, just copy the dashboard and change the SQL you are good to go.
You can also submit a PR for the change if you'd like it.
from incubator-devlake.
Hi @klesh,
I have checked and seems this API https://api.pagerduty.com/incidents/{id}
does not return that field 😞
{
"incident": {
"id": "PT4KHLK",
"type": "incident",
"summary": "[#1234] The server is on fire.",
"self": "https://api.pagerduty.com/incidents/PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK",
"incident_number": 1234,
"title": "The server is on fire.",
"created_at": "2015-10-06T21:30:42Z",
"updated_at": "2015-10-06T21:40:23Z",
"status": "acknowledged",
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"service": {
"id": "PIJ90N7",
"type": "service_reference",
"summary": "My Mail Service",
"self": "https://api.pagerduty.com/services/PIJ90N7",
"html_url": "https://subdomain.pagerduty.com/service-directory/PIJ90N7"
},
"assignments": [
{
"at": "2015-11-10T00:31:52Z",
"assignee": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"assigned_via": "escalation_policy",
"last_status_change_at": "2015-10-06T21:38:23Z",
"resolved_at": null,
"first_trigger_log_entry": {
"id": "Q02JTSNZWHSEKV",
"type": "trigger_log_entry_reference",
"summary": "Triggered through the API",
"self": "https://api.pagerduty.com/log_entries/Q02JTSNZWHSEKV?incident_id=PT4KHLK",
"html_url": "https://subdomain.pagerduty.com/incidents/PT4KHLK/log_entries/Q02JTSNZWHSEKV"
},
"alert_counts": {
"all": 2,
"triggered": 1,
"resolved": 1
},
"is_mergeable": true,
"escalation_policy": {
"id": "PT20YPA",
"type": "escalation_policy_reference",
"summary": "Another Escalation Policy",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA"
},
"teams": [
{
"id": "PQ9K7I8",
"type": "team_reference",
"summary": "Engineering",
"self": "https://api.pagerduty.com/teams/PQ9K7I8",
"html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8"
}
],
"pending_actions": [
{
"type": "unacknowledge",
"at": "2015-11-10T01:02:52Z"
},
{
"type": "resolve",
"at": "2015-11-10T04:31:52Z"
}
],
"acknowledgements": [
{
"at": "2015-11-10T00:32:52Z",
"acknowledger": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
}
}
],
"alert_grouping": {
"grouping_type": "advanced",
"started_at": "2015-10-06T21:30:42Z",
"ended_at": null,
"alert_grouping_active": true
},
"last_status_change_by": {
"id": "PXPGF42",
"type": "user_reference",
"summary": "Earline Greenholt",
"self": "https://api.pagerduty.com/users/PXPGF42",
"html_url": "https://subdomain.pagerduty.com/users/PXPGF42"
},
"priority": {
"id": "P53ZZH5",
"type": "priority_reference",
"summary": "P2",
"self": "https://api.pagerduty.com/priorities/P53ZZH5"
},
"resolve_reason": null,
"conference_bridge": {
"conference_number": "+1-415-555-1212,,,,1234#",
"conference_url": "https://example.com/acb-123"
},
"incidents_responders": [
{
"state": "pending",
"user": {
"id": "PL7A2O4",
"type": "user_reference",
"summary": "Lee Turner",
"self": "https://api.pagerduty.com/users/PL7A2O4",
"html_url": "https://subdomain.pagerduty.com/users/PL7A2O4",
"avatar_url": "https://secure.gravatar.com/avatar/51c673f51f6b483b24c889bbafbd2a67.png?d=mm&r=PG"
},
"incident": {
"id": "PXP12GZ",
"type": "incident_reference",
"summary": "Ongoing Incident in Mailroom",
"self": "https://api.pagerduty.com/incidents/PXP12GZ",
"html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ"
},
"updated_at": "2018-08-09T14:40:48-07:00",
"message": "Please help with issue - join bridge at +1(234)-567-8910",
"requester": {
"id": "P09TT3C",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/P09TT3C",
"html_url": "https://subdomain.pagerduty.com/users/P09TT3C",
"avatar_url": "https://secure.gravatar.com/avatar/1c747247b75acc1f724e2784c838b3f8.png?d=mm&r=PG"
},
"requested_at": "2018-08-09T21:40:49Z"
}
],
"responder_requests": [
{
"incident": {
"id": "PXP12GZ",
"type": "incident_reference",
"summary": "Ongoing Incident in Mailroom",
"self": "https://api.pagerduty.com/incidents/PXP12GZ",
"html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ"
},
"requester": {
"id": "P09TT3C",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/P09TT3C",
"html_url": "https://subdomain.pagerduty.com/users/P09TT3C"
},
"requested_at": "2018-08-16T14:55:17-07:00",
"message": "Please help with issue - join bridge at +1(234)-567-8910",
"responder_request_targets": [
{
"responder_request_target": {
"type": "user",
"id": "PL7A2O4",
"incidents_responders": [
{
"state": "pending",
"user": {
"id": "PL7A2O4",
"type": "user_reference",
"summary": "Lee Turner",
"self": "https://api.pagerduty.com/users/PL7A2O4",
"html_url": "https://subdomain.pagerduty.com/users/PL7A2O4",
"avatar_url": "https://secure.gravatar.com/avatar/51c673f51f6b483b24c889bbafbd2a67.png?d=mm&r=PG"
},
"incident": {
"id": "PXP12GZ",
"type": "incident_reference",
"summary": "Ongoing Incident in Mailroom",
"self": "https://api.pagerduty.com/incidents/PXP12GZ",
"html_url": "https://subdomain.pagerduty.com/incidents/PXP12GZ"
},
"updated_at": "2018-08-09T14:40:48-07:00",
"message": "Please help with issue - join bridge at +1(234)-567-8910",
"requester": {
"id": "P09TT3C",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/P09TT3C",
"html_url": "https://subdomain.pagerduty.com/users/P09TT3C",
"avatar_url": "https://secure.gravatar.com/avatar/1c747247b75acc1f724e2784c838b3f8.png?d=mm&r=PG"
},
"requested_at": "2018-08-09T21:40:49Z"
}
]
}
}
]
}
],
"urgency": "high",
"custom_fields": [
{
"id": "PT4KHEE",
"type": "field_value",
"name": "environment",
"display_name": "Runtime Environment",
"description": "environment where incident occurred",
"data_type": "string",
"field_type": "single_value_fixed",
"value": "production"
}
]
}
}
from incubator-devlake.
I think it could be calculated by subtracting created_at
from resolve_at
, no? Assuming resolved_at
is not null
.
from incubator-devlake.
@klesh @hayk96 I think this data is available from the analytics endpoint https://developer.pagerduty.com/api-reference/328d94baeaa0e-get-raw-data-single-incident as the field user_defined_effort_seconds
from incubator-devlake.
Thank you @richard-fletcher,
I have checked the API you shared, and seems the user_defined_effort_seconds
field shows something else. In my case it was null
("user_defined_effort_seconds": null)
from incubator-devlake.
It may only have a value when the field has been set by the user, did you test this?
from incubator-devlake.
Hmm, it seems that the value is not updating in real-time. Yesterday, I made some changes and tried calling this API several times but received null
. I just double-checked, and now I see that the value has been updated 😄
Thanks again @richard-fletcher it was really helpful!
@klesh, what are the plans regarding this? Can we add this feature in DevLake for calculating PD incident times?
I guess these two fields, seconds_to_resolve
and user_defined_effort_seconds
, can tell us how much time an incident took. For example, the seconds_to_resolve
field shows the incident duration in seconds (resolved_at - created_at). The user_defined_effort_seconds
field has a null
value by default. What do you think about calculating incident time via this API? If the user_defined_effort_seconds
is not null, the incident time can be the same as the seconds_to_resolve
field. Otherwise, we can take the value of the user_defined_effort_seconds
field.
from incubator-devlake.
Related Issues (20)
- [Bug][Webhook] Can't associate an existing webhook with a project HOT 4
- [BUG].[REFDIFF].[PLUGIN] - 'SELECT * FROM refs ORDER BY created_date desc' taking too long HOT 6
- [Bug][GitHub] wrong pipeline name column if run-name is defined HOT 2
- [Bug][Jira][REST API] Unable to set up Jira connection via API due to token length issue HOT 4
- [Bug][Onboard] Option `enableGraphQL` is disabled by default. HOT 1
- [Bug][GitHub] Missing Pull Request data when changing the Time Range in Sync Policy HOT 1
- [Feature][Jira issue changelogs] Add customized jira account fields to table.accounts HOT 1
- [Bug][Sonarcloud] Error 1406 (22001): Data too long for column 'project_key' at row 1 HOT 10
- [Bug][GitLab] Sometimes Project data are automatically deleted. HOT 3
- [Bug][cicd_pipelines] Fix pipelines with Github HOT 11
- [Bug][Gitlab] v1.0.1-beta2 Data Time Range not working HOT 21
- [Bug][CircleCI Plugin] Only collecting first page of API responses HOT 6
- [Bug][Config UI] AxiosError: Request failed with status code 502 HOT 4
- [Bug][Gitlab] Component and File-Level Metrics not displaying HOT 7
- [Feature][Framework] Reminder before token is expired
- [Question][Data Models] Code Quality / Testing HOT 8
- [Bug][Pagerduty] The PagerDuty connection is pulling incident data but this is not being reflected in metrics. HOT 8
- [Bug][Framework] Projects shouldn't be deleted if it has any connections.
- [Bug][pagerduty] DevLake does not collect PagerDuty incidents HOT 5
- [Feature][PR metrics] Add key timestamps to the `project_pr_metrics` table
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from incubator-devlake.