HAProxy Enterprise Documentation 1.8r2

set severity-output

Change the severity level format.

Description

When a Runtime API command returns an error or warning, that message has a numeric severity level, which comes from the RFC5424 Syslog severity levels. The the RFC specification describes the levels as follows:

Code

Severity

0

Emergency: system is unusable

1

Alert: action must be taken immediately

2

Critical: critical conditions

3

Error: error conditions

4

Warning: warning conditions

5

Notice: normal but significant condition

6

Informational: informational messages

7

Debug: debug-level messages

Call set severity-output with a value of number to show the code only. Call it with string to show the severity level name. By default, it is set to none, which shows neither the code nor the severity level name.

Examples

Below, we show three different formats for the same error message. We change the severity output format with the set severity-output command. Then in the same session, we call get acl without one of its required parameters to artificially prompt an error message.

Call set severity-output none to hide the severity level:

$ echo "set severity-output none; get acl #0" | sudo socat stdio /var/run/hapee-1.8/hapee-lb.sock

Missing ACL identifier and/or key.

Call set severity-output number to show the severity level number:

$ echo "set severity-output number; get acl #0" | sudo socat stdio /var/run/hapee-1.8/hapee-lb.sock

[3]: Missing ACL identifier and/or key.

Call set severity-output string to show the severity level name:

$ echo "set severity-output string; get acl #0" | sudo socat stdio /var/run/hapee-1.8/hapee-lb.sock

[err]: Missing ACL identifier and/or key.

Next up

Lua scripts