Host Template: Application - Haproxy

Overview Copied

Monitor your HAProxy server with a variety of checks, including Proxy Status, Connection Time, Bytes, Queue Size/Time and Request Rate/Time. Also includes information on denied and error requests and responses, as well as sessions and warnings.

This Host Template includes the following Service Checks:

Service Check Name Description Default Thresholds (Metric: Warning, Critical) UOM
Haproxy - Bytes Checks the bytes in and bytes out. Bytes_In: ​1000000,2000000 Bytes_Out: ​1000000,2000000 B
Haproxy - Connect Time The time in ms for a session to connect. Connect_Time: ​1000,2000 ms
Haproxy - Currrent Queue The current number in the queue. Current_Queue: ​200,300 count
Haproxy - Denied Connection

HAProxy 1.7 only

The number of denied connections made to the system.

Denied_Connection: ​10,15 count
Haproxy - Denied Requests The number of denied requests made to the system. Denied_Request: ​10,15 count
Haproxy - Denied Response The number of denied responses made to the system. Denied_Response: ​10,15 count
Haproxy - Denied Sessions

HAProxy 1.7 only

The number of denied sessions made to the system.

Denied_Response: ​10,15 count
Haproxy - Error Connections The number of error connections. Error_Connection: ​10,15 count
Haproxy - Error Requests The number of error requests. Error_Request: ​10,15 count
Haproxy - Error Response The number of error responses. Error_Response: ​10,15 count
Haproxy - Intercepted Requests

HAProxy 1.7 only

The number of intercepted requests.

Intercepted_Requests: ​900,1000 count
Haproxy - Queue Time The time in ms of the queue session. Queue_Time: ​1000,2000 ms
Haproxy - Request Rate The number of requests per second. Request_Rate: ​1000,2000 count/s
Haproxy - Request Time The time in ms of the session request. Request_Time: ​1000,2000 ms
Haproxy - Response Codes The number of code responses of each type. Code_4xx: ​300,450 Code_5xx: ​300,450 Code_Other: ​300,450 count
Haproxy - Session Rate The number of sessions per second. Session_Rate: ​1000,2000 count/s
Haproxy - Sessions Used The percentage of used sessions. Sessions_Used: ​70,90 %
Haproxy - Status Checks the status of the proxy. N/A N/A
Haproxy - Warnings Redispatched The number of redispatched warnings. Warnings_Redispatched: ​10,15 count
Haproxy - Warnings Retried The number of retried warnings. Warnings_Retried: ​10,15 count

Usage Instructions Copied

Please review the overall Application - Haproxy documentation for details on prerequisites, known issues, and other necessary configurations that apply to all Host Templates in the Opspack.

NOTE: If you are running HAProxy version 1.5 or 1.6 three service checks will need to be deactivated as the metrics are not available for those versions:

Add this Host Template Copied

Add the Application - Haproxy Host Template to your Opsview Monitor host. If the resource you’re monitoring has no hostname or public IP, then open the Advanced settings pane and change Host Check Command to Always assumed to be UP.

Note

For more information, refer to the documentation on Adding Host Templates to Hosts.

Add and configure variables required for this Host Template Copied

The Service Checks in this Host Template use the following variables, and they will be added to your Opsview Monitor instance alongside the Opspack:

HAPROXY Copied

Parameter Position in Variable Name Description   Default Value     
-u Arg1 Username HAProxy Username. Override with the same value as your haproxy.cfg file.
-p Arg2 Password HAProxy Password. Override with the same value as your haproxy.cfg file.
-P Arg3 Port HAProxy Port. Override with the same value as your haproxy.cfg file. 80
-s Arg4 Stats Path HAProxy Stats Path. Override with the same value as your haproxy.cfg file. haproxy?stats

HAPROXY_PROXY Copied

You can add multiple variables to check the status of each proxy individually.

Parameter Position in Variable Name Description
-n Value HAProxy Name Name of the HAProxy you want to monitor.

Note

For more information, refer to the documentation on Adding Variables to Hosts.

HAPROXY_CERTIFICATES Copied

Additionally, you can use the following optional variable to pass in your TLS certificates for use when connecting to the service provider to gather metrics. Ensure that the port given in the HAPROXY variable matches the desired endpoint.

Parameter Position in Variable Name Description
--ca-path Arg1 CA Certificate Path Optional path to the CA Certificate (TLS automatically used).
--client-cert Arg2 Client Certificate Path Optional path to the Client Certificate (TLS automatically used).
--client-key Arg3 Client Key Path Optional path to the Client Key (TLS automatically used).
(See Description) Arg4 Additional Arguments

Optional extra flags to pass to the plugin script. Flags:

  • -S - Use TLS.
  • -k - Ignore server certificate verification.

Apply Changes Copied

Apply Changes and the system will then be monitored:

View Output

["Opsview On-Premises"] ["Opsview > Opspacks"] ["User Guide", "Technical Reference"]

Was this topic helpful?