Good afternoon
I'm trying to create a acq-specs with this configuration but I've got this error:
Invalid Resource: a valid Resource Address must contain one of (Host,VM,DVS) Resource ID with EQUAL Query-Predicate
{
"counters": {
"cid_mid": {
"cid": "cpu.usage.PCPU"
}
},
"expiration": 0,
"interval": 30,
"memo_": "Create acq Specs Test",
"resources": [
{
"id_value": "datacenter-1001",
"predicate": "ALL",
"type": "PCPU"
}
]
}
Try with this spec:
POST: https://{{vc}}/api/stats/acq-specs
{
"counters": {
"cid_mid": {
"cid": "cpu.usage.PCPU"
}
},
"expiration": 0,
"interval": 30,
"memo_": "Create acq Specs Test",
"resources": [
{
"id_value": "*",
"predicate": "EQUAL",
"type": "HOST"
}
]
}
Try with this spec:
POST: https://{{vc}}/api/stats/acq-specs
{
"counters": {
"cid_mid": {
"cid": "cpu.usage.PCPU"
}
},
"expiration": 0,
"interval": 30,
"memo_": "Create acq Specs Test",
"resources": [
{
"id_value": "*",
"predicate": "EQUAL",
"type": "HOST"
}
]
}
There is any way to manage alerts in vSphere through some API?
Thanks for you answer. It worked for me