Data receiver service
The resources of the data receiver service enable sending entities, metric data points, and events directly to Virtana Service Observability. The data receiver service also supports gRPC methods.
Resource list
Create or update entities (POST /v1/data-receiver/models)
Create metric data points (POST /v1/data-receiver/metrics)
Create new events (POST /v1/data-receiver/events)
Create or update one or more entities. (The gRPC method name is PutModels.)
An update can delete an entity.
Request template
An abstract preview of a JSON request to create one entity.
{
"detailedResponse": <boolean>,
"models": [
{
"timestamp": <ms-since-epoch>,
"dimensions": {
"<key>": "<value>",
"<key>": "<value>"
},
"metadataFields": {
"<key>": "<value>",
"<key>": "<value>"
}
}
]
}
Request fields
Field | Type | Required | Description |
|---|---|---|---|
| Boolean | No | Provide specific feedback when parsing fails ( Default is |
| Array | Yes | An array of one or more entity objects. |
| Number | Yes | The date and time for the entity, specified as milliseconds since the epoch (January 1, 1970 at 00:00:00 UTC). Virtana Service Observability rejects requests with |
| Object | Yes | One or more key-value pairs that uniquely identify the entity. Some reserved key-value pairs are either required or commonly used in this field. See Dimension attributes. The |
| Object | Yes | One or more key-value pairs of additional information about the entity. Some reserved key-value pairs are either required or commonly used in this field. See Metadata attributes. The |
Status codes
Code | Description |
|---|---|
200 | Success. See response message. |
401 | Unauthorized. Missing or invalid authentication key. |
Example
Request example
curl https://YOUR-API-ENDPOINT/v1/data-receiver/models \
-H "content-type: application/json" \
-H "zenoss-api-key: YOUR-API-KEY" \
-X POST -s -S -d \
'{
"detailedResponse": true,
"models": [
{
"timestamp": 1600799308000,
"dimensions": {
"source": "my.simple.app",
"source-type": "com.example.simple"
},
"metadataFields": {
"name": "My.Simple.App"
}
}
]
}'
Response example
{
"succeeded": 1
}
Deleting an entity
To delete an entity, send a request with the following key-value pair in the models.metadataFields object:
"_zen_deleted_entity": true
Create one or more metric data points. (The gRPC method name is PutMetrics.)
Request template
An abstract preview of a JSON request to create one metric data point.
{
"detailedResponse": <boolean>,
"metrics": [
{
"timestamp": <ms-since-epoch>,
"metric": "<metric-name>",
"value": <data-point>,
"dimensions": {
"<key>": "<value>",
"<key>": "<value>"
}
}
]
}
Request fields
Field | Type | Required | Description |
|---|---|---|---|
| Boolean | No | Provide specific feedback when parsing fails ( |
| Array | Yes | An array of one or more metric data point objects. |
| Number | Yes | The date and time for the metric, specified as milliseconds since the epoch (January 1, 1970 at 00:00:00 UTC). Virtana Service Observability rejects requests with |
| String | Yes | The name of the metric. |
| Number | Yes | The measurement record for the metric. |
| Object | Yes | One or more key-value pairs that uniquely identify the entity associated with the metric.The contents of this object must match the key-value pairs of one entity's dimensions field. Some reserved key-value pairs are either required or commonly used in this field. See Dimension attributes. The |
| Object | No | One or more key-value pairs of additional information about the metric. Some reserved key-value pairs are either required or commonly used in this field. See Metadata attributes. The |
Status codes
Code | Description |
|---|---|
200 | Success. The request was processed. Check the response body for per-item results when processing multiple objects. |
401 | Unauthorized. The API key is missing or invalid. |
Example
Request example
curl https://YOUR-API-ENDPOINT/v1/data-receiver/metrics \
-H "content-type: application/json" \
-H "zenoss-api-key: YOUR-API-KEY" \
-X POST -s -S -d \
'{
"detailedResponse": true,
"metrics": [
{
"timestamp": 1600807394000,
"metric": "my.metric",
"value": 1349.3,
"dimensions": {
"source": "my.simple.app",
"source-type": "com.example.simple"
}
},
{
"timestamp": 1600807647000,
"metric": "my.metric",
"value": 1481.7,
"dimensions": {
"source": "my.simple.app",
"source-type": "com.example.simple"
}
}
]
}'
Response example
{
"succeeded": 2
"message": "successfully processed 2 out of 2 metrics"
}
Create one or more events. (The gRPC method name is PutEvents.)
Use the event management service to annotate events or set event status.
Request template
An abstract preview of a JSON request to create one event.
{
"events": [
{
"name": "<event-name>",
"status": "<status>",
"severity": "<severity>",
"summary": "<summary>",
"timestamp": "<ms-since-epoch>",
"dimensions": {
"<key>": "<value>",
"<key>": "<value>"
},
"metadataFields": {
"<key>": "<value>",
"<key>": "<value>"
}
}
]
}
Request fields
Field | Type | Required | Description |
|---|---|---|---|
| Boolean | No | Provide specific feedback when parsing fails ( |
| Array | Yes | An array of one of more event objects. |
| String | Yes | The date and time for the event, specified as milliseconds since the epoch (January 1, 1970 at 00:00:00 UTC). Virtana Service Observability rejects requests with |
| String | Yes | The name of the event. The value of this field and the key-value pairs of the For systems that employ event IDs, the value of this field should be the ID. Otherwise, the same value as the |
| Object | Yes | One or more key-value pair that uniquely identify the entity associated with the event. The contents of this object must match the key-value pairs of one entity's |
| String | No | The event severity. Default =
|
| String | No | The event status. Default =
|
| String | No | A context-free label that classifies the event. For systems that employ event IDs, the same value as the |
| String | No | A brief description of the event. The maximum size is 128 characters. |
| String | No | A longer description of the event. |
| Boolean | No | The acknowledgement state of the event, acknowledged ( |
| Object | No | One or more key-value pairs of additional information about the event. |
Status codes
Code | Description |
|---|---|
200 | Success. The request was processed. Check the response body for per-item results when processing multiple objects. |
401 | Unauthorized. The API key is missing or invalid. |
Example
Request example
curl https://YOUR-API-ENDPOINT/v1/data-receiver/events \
-H "content-type: application/json" \
-H "zenoss-api-key: YOUR-API-KEY" \
-X POST -s -S -d \
'{
"events": [
{
"name": "my first event",
"status": "STATUS_OPEN",
"severity": "SEVERITY_CRITICAL",
"summary": "Event created for my entity one",
"timestamp": "1625152452000",
"dimensions": {
"source": "my.simple.app.one",
"source-type": "com.example.simple"
},
"metadataFields": {
"eventClass": "/App"
}
},
{
"name": "my second event",
"status": "STATUS_OPEN",
"severity": "SEVERITY_ERROR",
"summary": "Event created for my entity two",
"timestamp": "1625152467000",
"dimensions": {
"source": "my.simple.app.two",
"source-type": "com.example.simple"
},
"metadataFields": {
"eventClass": "/App"
}
}
]
}'
Response example
{
"succeeded": 2
"message": "successfully processed 2 out of 2 events"
}