Skip to main content

On-board Logging and Monitoring

Logging​

Axinom DRM License Service produces logs and stores them in the configured Logs volume. The logs include:

  • Application/ClientErrors - logs related to request errors from end-users.
  • Application/ServerErrors - errors that occurred internally.
  • Application/Reporting - license requests information.
  • Application/Diagnostics - information about server startup, sync, etc.
  • Application/TracedRequests - detailed information about each web request.
  • nginx - logs related to NGINX (web server) errors.

You can check the logs for troubleshooting and for analyzing the runtime behavior, e.g. the number of processed requests.

Logging is implemented by NLog, which can be configured through the NLog.config file in the Config folder.

In production, it is recommended to use only Reporting, ServerErrors, and the ClientErrors loggers. Enabling other loggers (Diagnostics, TracedRequests) may unnecessarily increase the usage of disk space. The logger formatting can be changed if required through the configuration.

In production, we recommend to extract the logs from all on-board environments (e.g. from all vehicles of the fleet), aggregate them in a centralized location (using software like ElasticSearch or Graylog) and analyze them.

Caution

If you don’t extract the logs periodically, there is a risk of an infinite grows of the Logs folder. Especially if you allow TracedRequests and Diagnostics. As a very least you should configure logs rotation to prevent their infinite grows.

Monitoring​

Supervisor tool is used to monitor important processes of the DRM License Service and restart them if they stop working. It also acts as a container’s foreground process. Supervisor is already configured as required.

To monitor the health of the License Service in production you can periodically send a GET request to the /AcquireLicense endpoint and check if the response status code is 200.