S
S
sevmax2014-08-28 08:24:24
Zabbix
sevmax, 2014-08-28 08:24:24

How to parse HAProxy logs and send values ​​to Zabbix?

Comrade citizens!
I got stuck on parsing haproxy logs with sending values ​​to Zabbix in real time.
Here is the command to extract the time spent processing a request:

tail -f haproxy.log | awk '{print $10}' | cut -d/ -f4

Here is an example of sending a single value to Zabbix:
echo "- haproxy.app.processing.time 1234"|zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file - -vv

How to link these two commands into one?
I think that it is necessary to correctly arrange the input-output streams, but I don’t see a specific implementation yet.
Thank you for your help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sevmax, 2014-08-29
@sevmax

Solution found:
Perhaps someone will come in handy!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question