Enabling load balancing server monitoring

Enable monitoring for a load balancing server to get access to client metrics. For example, you can see information about the status of a server status and client count. Monitoring is not required for load balancing to work.

By default, every two minutes the backend receives information about the status of the stream servers and the number of clients from Prometheus.

Information

Jobs in Prometheus retrieve data from the streaming server and, in turn, cron jobs in MinistraPRO collect data from Prometheus.

The monitoring_server.ini configuration file contains the details of the Prometheus monitoring server.

To enable the collection of metrics

  1. Open the monitoring_server.ini configuration file.

  2. Modify the file to match the following example:

    [monitoring_server]
    
    monitoring_server[url]='https://prometheus.example.com/api/v1/query'
    
    ; auth type or empty, currently only 'basic' authorization type is supported
    
    monitoring_server[auth]=basic
    
    monitoring_server[user]='basic_auth_login'
    
    monitoring_server[password]='basic_auth_password'
    
    monitoring_server[timeout] = 30
    
    monitoring_server[connect_timeout] = 30
    
    monitoring_server[read_timeout] = 30
    
    monitoring_server[job_name] = 'job_name'
    
    monitoring_server[client_count_metric_name] = 'streamer_clients'

    Where:

    • [url] is the API endpoint for the monitoring server.

    • [user] and [password] are your monitoring server credentials.

    • [job_name] is the name of the metrics collection job.

    • [client_count_metric_name] is the name of the metric.

  3. Save and close the configuration file.

Information

If the response from the monitoring server contains no data, the status of the streaming server changes to Down.

If there is no response from the monitoring server, or the response contains an error, the status and number of clients for the specified streaming server do not change.