NXLog Docs

Health check (xm_hc)

This module provides HTTP response capabilities for checking NXLog’s health status. Using the xm_hc module, the running NXLog instance can accept inbound HTTP/1.1 GET requests and respond to these HTTP/1.1 200 OKs. It discards any other request types with HTTP 405 Method not allowed.

To examine the supported platforms, see the list of installer packages in the Available Modules chapter.

Configuration

The xm_hc module accepts the following directives in addition to the common module directives.

Required directives

The following directives are required for the module to start.

ListenAddr

The module accepts connections on the IP address or hostname and port defined by this directive. The default address is localhost and the default port is 8000. The port number is defined by appending it to the hostname or IP address using a colon as a separator in the format (host:port).

To listen on multiple addresses or ports in a single module instance, this directive can be repeated multiple times. Both IPv4 and IPv6 addresses are supported. If a DNS name is used, the number of addresses or cnames should be kept below 16 to avoid potential issues caused by DNS response size limits.

Example

Example 1. Sample example

In this example, the module listens on two ports and responds to the GET reqests.

nxlog.conf
<Extension hc>
   Module xm_hc
   ListenAddr 0.0.0.0:9999
   ListenAddr 0.0.0.0:9990
</Extension>