서버/Linux
netdata nginx 모니터링 추가
WYYOON
2019. 10. 8. 15:58
728x90
반응형
SMALL
nginx 모니터링은 stub_status 모듈을 통해 이뤄지는데 nginx 설치 때 해당 모듈이 설치되어 있어야 한다.
모듈이 설치되어 있다면 nginx.conf에 아래 설정을 추가해주면된다.
location /stub_status { stub_status; # Security: Only allow access from the IP below. allow 127.0.0.1; # Deny anyone else deny all; } |
nginx 재시작 후 curl http://localhost/stub_status 명령어를 실행하여 아래와 같은 결과가 나오면 정상이다.
Active connections: 1 server accepts handled requests 4 4 3 Reading: 0 Writing: 1 Waiting: 0 |
http://localhost:19999 접속하여 nginx local 페이지가 보이는지 확인하면됨.
728x90
반응형
SMALL