capabilities.work

Associate Entity With Condition

A 3-step recipe with New Relic. We can help you get access.

Recipe · 3 steps

Associate Entity With Condition

Create a condition on a policy then bind an entity to it.

  1. Resolve the alert policy id by exact name.
  2. Create a metric condition on the resolved policy, returning the condition id used for the entity association.
  3. Associate the supplied entity with the new condition so the condition evaluates specifically against that entity.
What you'll need to have ready
  • policyName: The exact name of the alert policy to create the condition on.
  • conditionName: A title for the alert condition.
  • conditionType: Condition type (e.g. apm_app_metric, browser_metric).
  • metric: The metric the condition evaluates.
  • entityId: The id of the entity to associate with the condition.
  • entityType: The entity type (BrowserApplication, Application, MobileApplication, Server, KeyTransaction).
For your developer

Arazzo workflow new-relic:associate-entity-with-condition, 3 operations: getAlertsPolicies → postAlertsConditionsPoliciesPolicyId → putAlertsEntityConditionsEntityId. Specs on APIs.io.