This page is a place for you and your team to learn how to query your data for issues and incidents and then configure features using our NerdGraph API.
Our two main data types are Issue Type
and Incident Type
.
Issue Type
You can learn more about data types of New Relic here:
Name | Type | Description |
---|---|---|
| [Int!]! | A list of account Ids. As an issue could be correlated with others from other accounts. |
| EpochMilliseconds | The time the issue was acknowledged. |
| String | The user that acknowledged the issue. |
| EpochMilliseconds | The time the issue was activated: createdAt + gracePeriod. |
| EpochMilliseconds | The time the issue was closed. |
| String | The user that manually closed the issue. |
| EpochMilliseconds | The time the issue was created. |
| [String!]! | A list of incident descriptions. |
| [EntityGuid!] | A list of unique entity identifiers. |
| [String!] | A list of entity names. |
| [String!] | A list of entity types. |
| [Int!]! | See overview of alerts to learn about environments. |
| String! | An issue event that could be |
| [String!] | A list of incident IDs in this issue. In some cases there may be thousands of incidents in an issue. |
| Boolean! | True means that other issues were correlated to this one. |
| Boolean! | See our documentation to learn about idle issues. |
| ID! | Issue identifier. |
| [String!]! | A list of origins of incidents like incidents, anomalies, and external. |
| Priority! | The issue priority. Can be one of: |
| [String!]! | A list of sources of the incidents like newrelic or external. |
| IssueState! | Issue state can be one of: |
| [String!]! | A list of underlying incident titles. |
| Int! | The count of underlying incidents. |
| EpochMilliseconds! | The time the issue was last updated. |
Issue lifecycle and state
Idle issues:
- An issue can become idle if it is too big, meaning it contains 5000 incidents or more.
- An idle issue does not accept any more incidents.
- An idle issue will not correlate to other issues.
Incident type
Field | Type | Description |
---|---|---|
| String | An account id this incident is stored in. |
| EpochMilliseconds | The time the incident was closed. |
| EpochMilliseconds | The time the incident was created. |
| String | The description is generated from the policy name and the condition name or provided through API. |
| EntityGuid | An unique entity identifier. |
| String | An entity name. |
| String | An entity type. |
| Int! | See our documentation to learn about environments. |
| ID | Incident identifier. |
| Priority | Incident priority. Can be one of: |
| IncidentState. | Incident state. Can be one of: |
| EpochMilliseconds | Incident event timestamp. |
| String | The description the user gave the condition if provided. |
| EpochMilliseconds | The time the incident was last updated. |
| Optional | If this incident originated from a New Relic anomaly it will have an anomaly ID. |
| Optional | The condition id |
| String | The Id of the policy that generated this incident. |
| [KeyValue!] | Aggregation of tags related to this incident. |
List and filter issues
The issues
query allows you to paginate through all of your issues per account. It also allows some filtering functionality on the issues.
List and filter issue events
The issuesEvents
query allows you to paginate through all of your issues events per account. It also allows some filtering functionality on the issues events.
List and filter Incidents
The incidents
query allows you to paginate through all of your incidents per account. It also allows some filtering functionality on each incident.
The following types of incidents are supported:
- NewRelicIncident
- AnomalyIncident
- RestIncident
List and filter incident events
The incidentsEvents
query allows you to paginate through all of your incidents events per account. It also allows some filtering functionality on the incidents events.
Configure issues features
Issues service has some configuration parameters.
To get the current configuration parameters for your environment, you can run configByEnvironment
query.
Acknowledge or unacknowledge issues
Using mutations
you can acknowledge or unacknowledge and resolve the given issue by its issueId
.
- aiIssuesAckIssue
- aiIssuesResolveIssue
- aiIssuesUnackIssue
Running from the command line
To run queries from the command line:
1 Get your API key, fetch or create one in the API Key UI.
2 Export it to your shell with export API_KEY=my_api_key
3 Run these examples:
Important
You must include an experimental opt-in header in your requests. Otherwise, you get access errors like this:
{"data":{"actor":{"account":{"aiIssues":{"issues":null}}}},"errors":[{"extensions":{"errorClass":"ACCESS_DENIED","nrOnly":{}},"locations":[{"column":70,"line":1}],"message":"You must opt in to using experimental schemas by passing the 'nerd-graph-unsafe-experimental-opt-in: AiIssues' header.\n\nProviding the header indicates that you acknowlege that the field(s) you are querying are subject to breaking changes.\n","path":["actor","account","aiIssues","issues"]}]}%