You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to set an alert condition for when the synthetics checks reach a certain limit per month, but can't use SINCE in the query like this:
query = "SELECT (sum(syntheticsFailedCheckCount) + sum(syntheticsSuccessCheckCount)) AS 'Total Checks' FROM NrDailyUsage WHERE syntheticsTypeLabel != 'Ping' SINCE this month"
as SINCE isn't valid input:
Error: Validation Error: BAD_USER_INPUT
nrql.query: NRQL query must not contain [SINCE] keyword(s)
Describe Alternatives
Considered aggregation_window but isn't valid also, because currently the maximum is 6hours and also because i'd want the counting to be from the start of each month. Even if the aggregation window was increased, it's not set by a date, but by time from now.
The text was updated successfully, but these errors were encountered:
Hii @DFurt there are few reasons for the restricted usage of SINCE in nrql alert condition query - here's what our Alerts team at New Relic has to say (we reached out to them to double check if it was an actual design decision to not support SINCE in alert conditions)
The restriction on using the SINCE keyword in NRQL alert conditions because alerts need to evaluate data based on fixed aggregation windows instead of dynamic time ranges and we engineered the conditions to trigger based on the things set in the "thresholds" section and if you were to try to have a "since" clause and a "threshold" set, there may be some weird outcomes. e.g. "since 1 hour ago" 1 hour ago from when? from when you enable it? from when you create it? we'd have to track these things and thats just not how it was created to work.
pranav-new-relic
changed the title
Allow SINCE on newrelic_nrql_alert_condition query
Resource newrelic_nrql_alert_condition: Allow SINCE on queryJan 2, 2025
Feature Description
I'm trying to set an alert condition for when the synthetics checks reach a certain limit per month, but can't use SINCE in the query like this:
as SINCE isn't valid input:
Describe Alternatives
Considered aggregation_window but isn't valid also, because currently the maximum is 6hours and also because i'd want the counting to be from the start of each month. Even if the aggregation window was increased, it's not set by a date, but by time from now.
The text was updated successfully, but these errors were encountered: