damp-book-35965
08/29/2019, 10:06 PMInfraAlertCondition
https://github.com/pulumi/pulumi-newrelic/blob/master/sdk/nodejs/infraAlertCondition.ts
This is not working for me
This link provides all the data available through NR: https://docs.newrelic.com/docs/integrations/kubernetes-integration/understand-use-data/understand-use-dataconst customControllerAlert = new newrelic.InfraAlertCondition("Custom controller alert", {
name: "test",
type: "infra_metric",
policyId: alertChannels.mustangAlertPolicy.id.apply(id => parseInt(id)),
select: "isReady",
event: "K8sPodSample",
integrationProvider: "K8sPodSample",
comparison: "below",
where: "(clusterName='online-sandbox-nshah' AND namespace='podscaling-controller-system'",
critical: {
duration: 20,
timeFunction: "all",
value: 1
},
enabled: true
}, {dependsOn: [cluster], provider: newrelicProvider })
gentle-diamond-70147
08/29/2019, 10:12 PMdamp-book-35965
08/29/2019, 10:14 PMgentle-diamond-70147
08/29/2019, 10:14 PMdamp-book-35965
08/29/2019, 10:15 PMnewrelic:index:InfraAlertCondition (Custom controller alert):
error: Plan apply failed: Unexpected status 500 returned from API
400
as wellgentle-diamond-70147
08/29/2019, 10:20 PM--debug
and see if you get a more detailed error message?damp-book-35965
08/29/2019, 10:23 PM{'data': {'comparison': 'below',
'created_at_epoch_millis': 1567110212508,
'critical_threshold': {'duration_minutes': 10,
'time_function': 'all',
'value': 1},
'enabled': True,
'event_type': 'K8sPodSample',
'filter': {'and': [{'is': {'clusterName': 'online-sandbox-nshah'}},
{'is': {'namespace': 'podscaling-controller-system'}}]},
'id': 10905253,
'name': 'Custom scaling controller is always up and ready',
'policy_id': 510634,
'select_value': 'isReady',
'type': 'infra_metric',
'updated_at_epoch_millis': 1567110212618,
'violation_close_timer': 24}}
gentle-diamond-70147
08/29/2019, 10:26 PMwhere
clause for the InfraAlertCondition
. More details are at https://github.com/pulumi/pulumi-newrelic/issues/22.