I'm trying to create an alert in vROPs using the API and I'm having issues with my JSON configuration, I've been playing around for a while now and cant get it to work... any tips?
/api/alertdefinitions
{
"name" : "VM Reconfiguration 2",
"description" : "TBD",
"adapterKindKey" : "VMWARE",
"resourceKindKey" : "HostSystem",
"waitCycles" : 1,
"cancelCycles" : 1,
"type" : 15,
"subType" : 19,
"states" : [ {
"severity" : "WARNING",
"base-symptom-set" : {
"type" : "SYMPTOM_SET",
"operator" : "AND",
"symptom-sets" : [ {
"type" : "SYMPTOM_SET",
"relation" : "SELF",
"aggregation" : "ALL",
"symptomSetOperator" : "AND",
"symptomDefinitionIds" : [ "{{TempSymptomID}}" ]
} ]
}
} ]
}
When I POST, I'm getting the following error:
{
"name" : "VM Reconfiguration 2",
"description" : "TBD",
"adapterKindKey" : "VMWARE",
"resourceKindKey" : "HostSystem",
"waitCycles" : 1,
"cancelCycles" : 1,
"type" : 15,
"subType" : 19,
"states" : [ {
"severity" : "WARNING",
"base-symptom-set" : {
"type" : "SYMPTOM_SET",
"operator" : "AND",
"relation" : "SELF",
"symptomDefinitionIds" : [ "{{TempSymptomID}}" ]
},
"impact": {
"impactType": "BADGE",
"detail": "health"
}
}
]
}
{
"name" : "VM Reconfiguration 2",
"description" : "TBD",
"adapterKindKey" : "VMWARE",
"resourceKindKey" : "HostSystem",
"waitCycles" : 1,
"cancelCycles" : 1,
"type" : 15,
"subType" : 19,
"states" : [ {
"severity" : "WARNING",
"base-symptom-set" : {
"type" : "SYMPTOM_SET",
"operator" : "AND",
"relation" : "SELF",
"symptomDefinitionIds" : [ "{{TempSymptomID}}" ]
},
"impact": {
"impactType": "BADGE",
"detail": "health"
}
}
]
}