Adding items to the Haproxy log
ro:Adăugarea de elemente în jurnalul Haproxy
ru:Добавление элементов в журнал Haproxy
pl:Dodawanie elementów do logu Haproxy
ja:Haproxyログへの項目追加
zh:向Haproxy日志添加项目
de:Hinzufügen von Elementen zum Haproxy-Protokoll
nl:Toevoegen van items aan de Haproxy log
it:Aggiungere elementi al registro Haproxy
pt:Acrescentar itens ao registo Haproxy
es:Añadir elementos al registro de Haproxy
fr:Ajouter des éléments dans le log Haproxy
This article has been created by an automatic translation software. You can view the article source here.
Introduction
We will see how to add items to the Haproxy log
Course
In our example we want to add the name of the called domain in the Haproxy logs (by default there is just the URI), we will add in the frontend:
capture request header Host len 50
The value len 50 represents the number of characters to capture (here 50), you can adapt this to the length of your domain names.
A second example to add the User-agent :
capture request header User-Agent len 64
You can do this with any headers you wish to display in the logs.
Cet article vous a semblé utile ?
Enable comment auto-refresher