Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Feature Idea: Create baseline alert conditions with API



Dynamic base line alerts were introduced last year but there is still now way to create them from API.

I really like baseline alert conditions but it’s really pity there is no way to create them dynamically from API. With all recents changes with new Alerts and Infrastructure I do not understand why new features are released without corresponding APIs.

Also if I try list conditions for entity with baseline conditions I’m getting response with null values.

curl -X GET '' \
     -H 'X-Api-Key:XX' -i \
     -G -d 'entity_type=Application' 
HTTP/1.1 200 OK
content-type: application/json
cache-control: max-age=0, private, must-revalidate
  "conditions": [
      "id": null,
      "type": null,
      "name": null,
      "enabled": null,
      "entities": null,
      "metric": null,
      "terms": null

New Relic Edit

  • I want this too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.

NRQL Baseline condition via api

Hi @mkubenka,

You’re right, and API for managing baseline conditions isn’t available yet. It’s still in the backlog. One of the challenges with baseline conditions that other condition type don’t have is the sensitivity setting. Unlike others in the space with a similar feature they use standard deviations as their control over the confidence band. We don’t don’t do that as it would inhibit and restrict quality of the feature and what we are able to do with it in the future.

Instead the sensitivity is computed based on the quality of our one-minute-ahead predictions, which varies over different data series. The prediction quality is based not on our ability to predict the actual data series, but on our ability to predict a smoothed version of the data series, to lessen the effects of outliers. This smoothing is complicated, it can evolve over time and also data series specific.

Currently we allow users to bypass these complications by allowing the user to see a preview of the baseline and confidence band and set the sensitivity using a UI that tells them an estimate of how many violations would have occurred with those settings over the last week. This human interpretation of a 7 day preview to set the right sensitivity is the challenge to replicate in an API.

How can we allow customers to set a meaningful sensitivity when creating one of these conditions via API?

One thought is that instead of setting the sensitivity directly the API input is the number of violations in the last 7days you would have liked to have triggered and we’ll choose the sensitivity that most closely gets the condition to achieving that.

If you have any feedback or thoughts on this approach please let me know. Also, know that vision for Alerts is to eventually have everything you can do in the UI available via API in a clean well documented way.


@NateHeinrich Thanks for detailed reply. I like the approach with setting number of violations in the last 7days. One suggestion from my side - would it be possible to set direction of anomaly? So, for example I’m only interested in high traffic spikes or I’m only interested in sudden drop of network traffic.

I’m happy there is a intention to have everything available via API and surely most of the things I come across were API ready.


Cool thanks for the feedback!

You can’t do that today. However, being able to specify only above, only below or both in regards to the baseline has come up in a number of recent conversations. I think it is a totally reasonable request.


I understand the complexities of creating these baseline conditions via the API as you laid out but has there been any progress or update on adding this functionality? We have hundreds of baseline alerts/conditions we would like to automate creation of as part of our automated deployments. This will allows us to ensure all micro services and applications within our organization have these alerts set up and save the manual set up time. Even if this must be a manual process for now, we would at least like the ability to retrieve a list of the existing baseline alerts/conditions via the API. This would allow us to, at minimum, identify any services/apps that have been missed. Unfortunately, I do not believe this functionality exists yet as well.


Are there any updates on this? We would also like to create these alerts programmatically via terraform.


My team is also interested in this!


Interested in this feature too!


@jjayakumaran - I’ll add your +1 here :smiley:


Having this available via the API is important for us. We have multiple New Relic accounts and leverage the API to promote configuration from Test -> Production (monitoring as code, allowing revision control for dashboards and alert policies).

Having this available in the API would allow us to really leverage the baseline alert conditions.
We’d rather not have developers manually promoting configuration changes from test to production.


Thanks for posting your detail here @tim.fagergren - I’ll get your +1 added here.


My team is interested in this feature.


Thanks @JFlanery - I just added your +1 :slight_smile:


My team is also interested in this feature.


You got it!! Thanks @di.zhu1 I’ll add that +1


We would also love to see this feature live. We are creating a set of alert conditions for every new service/instance automatically using a k8s controller The lack of api support for baseline alert conditions adds a manual step to flow which make it less scalable. Thanks in advance!


Hey @oliver.klette - Thanks for sharing that here - we’ll be sure to get your +1 and that feedback added.


Not sure how we can manage to create new alerts on a ton of micro-services as well as new micro-services where we want baseline alerting on. Is the recommendation currently to do this manually?


@cedric.l.dana - Currently yes - there is no API for creating baseline conditions at the moment. I can certainly add your use case to our feature idea internally.


Since, the API is not available and there is no timeline on that (it’s really required) as to when it would be available, is there any other way apart from using Apdex directly, that we can leverage the NRQL, to generate this baseline and then may be on top of that a small piece of code can be written which will look at the data from the baseline, check for the deviation and issue an alert ?