sparse-intern-71089
08/29/2019, 10:06 PMdamp-book-35965
08/29/2019, 10:07 PMconst 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 })
damp-book-35965
08/29/2019, 10:08 PMgentle-diamond-70147
08/29/2019, 10:12 PMgentle-diamond-70147
08/29/2019, 10:13 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
damp-book-35965
08/29/2019, 10:15 PMdamp-book-35965
08/29/2019, 10:15 PMdamp-book-35965
08/29/2019, 10:15 PM400
as welldamp-book-35965
08/29/2019, 10:15 PMdamp-book-35965
08/29/2019, 10:16 PMgentle-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 PMdamp-book-35965
08/29/2019, 10:24 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 PMgentle-diamond-70147
08/30/2019, 7:10 PMwhere
clause for the InfraAlertCondition
. More details are at https://github.com/pulumi/pulumi-newrelic/issues/22.