newrelic-quickstarts
newrelic-quickstarts copied to clipboard
💡 FR - New syntax support for alert conditions
Summary
Requesting support for more natural syntax options surrounding the creation of alert conditions.
Desired Behavior
Using the New Relic UI, creation of alert conditions allows you to copy both a NerdGraph Mutation snippet and a Terraform snippet.
The current workflow for creating a quickstart alert is to manually transcribe an alert from these natural snippets (or the UI itself) into the YAML syntax we require for the backend service to create an alert. Essentially we are having users create an alert in the UI, copy the NerdGraph mutation, transcribe that into YAML, and then we take that YAML and make a NerdGraph mutation 🙃
Possible Solution
Add direct support for users to simply upload a GraphQL file for alert conditions.
Additional context
GraphQL from New Relic UI:
mutation {
alertsNrqlConditionStaticCreate(
accountId: <REDACTED>
policyId: <REDACTED>
condition: {
enabled: false
name: "Active Directory Replication Failures"
description: null
nrql: {
query: "FROM activeDirectoryReplicationPartners SELECT count(*)
FACET server, partner
// Finding all entries where the Attempt timestamp != the Success timestamp, indicating a failure
WHERE lastReplicationSuccess != lastReplicationAttempt"
}
expiration: null
runbookUrl: null
signal: {
aggregationWindow: 60
fillOption: NONE
aggregationDelay: 120
aggregationMethod: EVENT_FLOW
aggregationTimer: null
fillValue: null
slideBy: null
evaluationDelay: null
}
terms: [
{
operator: ABOVE
threshold: 0
priority: CRITICAL
thresholdDuration: 120
thresholdOccurrences: ALL
}
]
violationTimeLimitSeconds: 86400
}
) {
id
}
}
Same alert, in our YAML syntax:
name: Active Directory Replication Failures
description: |+
This alert is triggered when the Attempt timestamp != the Success timestamp, indicating a failure in replication between domain contollers.
type: STATIC
nrql:
query: "FROM activeDirectoryReplicationPartners SELECT count(*) FACET server, partner WHERE lastReplicationSuccess != lastReplicationAttempt"
valueFunction: SINGLE_VALUE
terms:
- priority: CRITICAL
operator: ABOVE
threshold: 0
thresholdDuration: 120
thresholdOccurrences: ALL
expiration:
closeViolationsOnExpiration: false
openViolationOnExpiration: false
expirationDuration: null
signal:
aggregationDelay: 120
aggregationMethod: EVENT_FLOW
aggregationTimer: null
aggregationWindow: 60
fillOption: NONE
fillValue: null
slideBy: null
violationTimeLimitSeconds: 86400
Old issues will be closed after 105 days of inactivity. This issue has been quiet for 90 days and is being marked as stale. Reply here to keep this issue open.
Still a valid FR
Old issues will be closed after 105 days of inactivity. This issue has been quiet for 90 days and is being marked as stale. Reply here to keep this issue open.
Still a valid FR
Old issues will be closed after 105 days of inactivity. This issue has been quiet for 90 days and is being marked as stale. Reply here to keep this issue open.