Upload metrics
post
/serviceapi/entityModel/uds/metrics
Upload metric data.
If the entity, entity type, or metric is user-defined or doesn't exist yet, Oracle Management Cloud will create it automatically.
Request
Supported Media Types
- application/octet-stream
- application/json
Query Parameters
-
async(optional): string
asynchronous or synchronous data loading. Use asynchronous loading for large data setsDefault Value:
true
Root Schema : InputStream
Type:
object
Response
Supported Media Types
- application/json
200 Response
successful operation
Root Schema : DataIngestStatus
Type:
object
Describes the status of a data ingest batch job.
-
count:
integer(int32)
The number of records received in a load packetExample:
1000
-
ecId:
string
The execution context id that is associated with every load requestExample:
92aa97cc-01eb-4ff8-a49e-13b4ce76aed0
-
endTime:
string(date-time)
The time in UTC when the upload completedExample:
2017-12-23T21:08:45.998Z
-
errorMessage(optional):
string
The error message if the upload failedExample:
an error message
-
loaded:
integer(int32)
The number of loaded recordsExample:
900
-
message(optional):
string
An additional message about the loadExample:
a message
-
rejected:
integer(int32)
The number of rejected recordsExample:
100
-
selfLink:
string
Read Only:
true
The link to this status resourceExample:/serviceapi/data/facts/status/92aa97cc-01eb-4ff8-a49e-13b4ce76aed0
-
size:
integer(int32)
The size of the packetExample:
10000
-
startTime:
string(date-time)
The time in UTC when the upload startedExample:
2017-12-23T21:08:40.123Z
-
status:
string
Allowed Values:
[ "IN_PROGRESS", "SUCCESS", "FAILED" ]
The status of the uploadExample:IN_PROGRESS
Examples
Upload metric data:
Payload:
[ { "entityType":"myHostType", "entityName":"myHostEntity1", "collectionTime":"2018-10-11T13:14:15.001Z", "dimension":{ "cpuId":"0" }, "metric":"cpuUser", "value":20 }, { "entityType":"myHostType", "entityName":"myHostEntity1", "collectionTime":"2018-10-11T13:14:15.001Z", "dimension":{ "cpuId":"0" }, "metric":"cpuSystem", "value":50 }, { "entityType":"myHostType", "entityName":"myHostEntity1", "collectionTime":"2018-10-11T13:14:15.001Z", "dimension":{ "cpuId":"0" }, "metric":"cpuIdle", "value":30 }, { "entityType":"myHostType", "entityName":"myHostEntity2", "collectionTime":"2018-10-11T13:14:15.001Z", "dimension":{ "cpuId":"1" }, "metric":"cpuUser", "value":10 }, { "entityType":"myHostType", "entityName":"myHostEntity2", "collectionTime":"2018-10-11T13:14:15.001Z", "dimension":{ "cpuId":"1" }, "metric":"cpuSystem", "value":5 }, { "entityType":"myHostType", "entityName":"myHostEntity2", "collectionTime":"2018-10-11T13:14:15.001Z", "dimension":{ "cpuId":"1" }, "metric":"cpuIdle", "value":85 } ]
curl -u ${OMC_USERNAME}:${PASSWORD} -X POST -H "Content-Type:application/json" -d "@example.json" "https://serverurl/serviceapi/entityModel/uds/metrics"Back to Top