Monitoring
This page describes how you best monitor Onify components and services.
Because Onify is a very flexible platform and can be run on many different platforms including Windows, Linux, Mac OS, Kubernetes, Docker, OpenShift, etc. We cannot document any scenario but will try to explain the basics here.
Onify Hub
The Onify Hub consists of the components APP, API and Worker. These are developed in Node.js.
API
Monitoring container
If you are running Onify Hub API as a container, it is important to monitor that the container is actually up and running. The API is the heart of Onify so it is crucial that the service working.
Monitoring logs
One of the best way to monitor the API is to monitor the (container/console) logs. We recommend some type of log-management platform such as Logstash.
Health endpoint
By setting api_health
to true in settings you enable the /health
endpoint and this can be monitored by different platforms like eg. Kubernetes. This is using the CloudNativeJS/cloud-health-connect library.
Example reponse from /health endpoint
{
"status": "UP",
"checks": [
{
"name": "liveCheck",
"state": "UP",
"data": {
"reason": ""
}
}
]
}
Metrics endpoint
Onify support the Prometheus for scraping "metrics". To enable this, set the api_metrics
setting to true. This will enable the /metrics
endpoint.
APP
Monitoring container
If you are running Onify Hub APP as a container, it is important to monitor that the container is actually up and running.
Worker
Monitoring container
If you are running Onify Hub Worker as a container, it is important to monitor that the container is actually up and running.
Onify Agent Server
Onify Agent
Monitoring container
If you are running Onify Agent as a container, it is important to monitor that the container is actually up and running.
Monitoring service
If you are running Onify Hub APP as a service, it is important to monitor that the service is actually up and running.
Monitoring logs
One of the best way to monitor the Agent is to monitor the log files. We recommend some type of log-management platform such as Logstash.
Elasticsearch
Here is documentation how to monitor Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/current/monitor-elasticsearch-cluster.html
Updated 2 months ago