> ## Content Index
> Fetch the complete content index at: https://suitmyself.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# HAPROXY용 HATOP
- URL: https://suitmyself.com/haproxyyong-hatop/
- Published: 2023-05-05T11:02:15.000Z
- Updated: 2026-09-20T06:16:50.000Z
- Author: Benjamin Kim
- Tags: Server, #Import 2026-09-15 05:58

[https://www.datadoghq.com/blog/how-to-collect-haproxy-metrics/](https://www.datadoghq.com/blog/how-to-collect-haproxy-metrics/?ref=suitmyself.com)  
[https://code.google.com/archive/p/hatop/downloads](https://code.google.com/archive/p/hatop/downloads?ref=suitmyself.com)

## 1\. 설치하기

- hatop의 기본링크의 데이타가 오류가 발생하고 있는 관계로 저장링크로 대체하여 다운로드 한다.

```bash
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hatop/hatop-0.7.7.tar.gz install -m 755 bin/hatop 
/usr/local/bin install -m 644 man/hatop.1 /usr/local/share/man/man1 gzip /usr/local/share/man/man1/hatop.1

```

## 2\. Create HAPRoxy Socket

HATOP이 HAProxy에서 통계를 수집할 수 있도록 하려면 소켓 파일을 생성하도록 HAProxy를 구성해야 합니다. 이 소켓 파일은 HATOP이 다른 통계에 액세스하는 데 필요한 것입니다.

1. HAProxy.cfg 파일을 에디터로 오픈.

```bash
vi /etc/haproxy/haproxy.cfg

```

1. global 섹션 에 아래의 내용을 추가

```bash
stats socket /var/run/haproxy.sock mode 600 level admin

```

1. Haproxy를 재시작

```bash
sudo service haproxy restart

```

## 3\. Launching HATop

1. 아래와 같이 확인 후 python2.7 또는 3.7을 python 을 지정

```bash
$ ls /usr/bin/ | grep python
python2.7
python3
python3.8

$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1

```

1. 아래와 같이 hatop를 실행

```bash
sudo hatop -s /var/run/haproxy.sock

```

1. 다음과 같은 화면이 나오면 완료

![69197805f9a5498f56b231cb91783af2f7218ab65a476660fcd97b856e7c1d81-hatop2](https://suitmyself.com/content/images/2023/05/69197805f9a5498f56b231cb91783af2f7218ab65a476660fcd97b856e7c1d81-hatop2.png)

HaProxy가 제대로 동작하고 있음을 확인할 수 있으며 해당 소스와 소켓 인터페이스를 통한 데이터의 분석을 통해 모니터링 그래프등을 만들 수 있다.

[https://goaccess.io/](https://goaccess.io/?ref=suitmyself.com)  
[https://github.com/allinurl/goaccess.git](https://github.com/allinurl/goaccess.git?ref=suitmyself.com)  
[https://m.blog.naver.com/wideeyed/221303339246](https://m.blog.naver.com/wideeyed/221303339246?ref=suitmyself.com)  
[https://idchowto.com/haproxy-모니터링/](https://idchowto.com/haproxy-%EB%AA%A8%EB%8B%88%ED%84%B0%EB%A7%81/?ref=suitmyself.com)  
[https://findstar.pe.kr/2019/01/05/haproxy-stat-metric/](https://findstar.pe.kr/2019/01/05/haproxy-stat-metric/?ref=suitmyself.com)  
[https://www.datadoghq.com/blog/how-to-collect-haproxy-metrics/](https://www.datadoghq.com/blog/how-to-collect-haproxy-metrics/?ref=suitmyself.com)  
[http://feurix.org/projects/hatop/install/](http://feurix.org/projects/hatop/install/?ref=suitmyself.com)  
[https://support.ptc.com/help/thingworx/platform/r9/ko/index.html#page/ThingWorx/Help/ThingWorxHighAvailability/HAProxyExample.html](https://support.ptc.com/help/thingworx/platform/r9/ko/index.html?ref=suitmyself.com#page/ThingWorx/Help/ThingWorxHighAvailability/HAProxyExample.html)

[https://serverfault.com/questions/721574/haproxy-stats-page-not-working/721579](https://serverfault.com/questions/721574/haproxy-stats-page-not-working/721579?ref=suitmyself.com)  
[https://gist.github.com/haproxytechblog?page=5](https://gist.github.com/haproxytechblog?page=5&ref=suitmyself.com)