Assure1 Metric Sink Microservice¶
Overview¶
The Assure1 Metric Sink microservice is part of the microservice metric pipeline. The Metric Sink is responsible for taking metrics that have been normalized and inserting them into the Metric database.
Prerequisites¶
-
A microservices cluster must be setup. Refer to Microservice Cluster Setup.
-
Apache Pulsar must be installed. Refer to Apache Pulsar microservice.
Setup¶
su - assure1
export NAMESPACE=a1-zone1-pri
export WEBFQDN=<Primary Presentation Web FQDN>
a1helm install metric-sink assure1/metric-sink -n $NAMESPACE --set global.imageRegistry=$WEBFQDN
Default Configuration¶
Name | Value | Possible Values | Notes |
---|---|---|---|
LOG_LEVEL | INFO | FATAL, ERROR, WARN, INFO, DEBUG | Logging level used by application. |
STREAM_INPUT | persistent://assure1/metric/sink | Text, 255 characters | Apache Pulsar topic path. Topic at end of path may be any text value. |
Configurations can be changed by passing the values to the a1helm install
prefixed with the configData parent key.
Example of setting the log level to DEBUG¶
a1helm install ... --set configData.LOG_LEVEL=DEBUG
Schema¶
Metric-sink is expecting metric measurements in the following schema example:
{
"@timestamp": "2021-05-06T18:40:00.000Z",
"measurement": "iot_test",
"tags": {
"host": "some_host",
"instance": "some_instance"
},
"fields": {
"availability": 1,
"value": 123456789000,
"utilization": 0.1,
"other": 1
}
}
Debugging¶
The metric-sink consists of two components: metric-sink and telegraf. To see logs for each of the components run following command (replacing appropriate parameters):
For metric-sink logs:
a1k logs <full-pod-name> -n a1-zone1-pri metric-sink
For telegraf logs:
a1k logs <full-pod-name> -n a1-zone1-pri telegraf