[Using GCP] Stackdriver Third-party Appication Monitoring (5.NginX)

글쓴이 : 윤성재 (공작명왕)
E-mail : <gongjak@gmail.com>
Facebook : < https://www.facebook.com/sungjae.yun >

Nginx Plugin

1.Nginx 설치와 시작

< Debian 8 >

sudo apt-get install nginx

< CentOS 7 >

sudo yum install epel-release
sudo yum install nginx
sudo systemctl start nginx

2.사전 준비

cd /etc/nginx/conf.d/ && sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/nginx/conf.d/status.conf

3.Plugin 설치

cd /opt/stackdriver/collectd/etc/collectd.d/ && sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/nginx.conf

4.Stackdriver Agent 재시작

< Debian 8 >

sudo service stackdriver-agent restart

< CentOS 7 >

sudo systemctl restart stackdriver-agent

5.Monitoring 확인

Monitoring -> Resources -> Instances

각 서버를 클릭해보자. stackdriver agent가 plugin이 정상으로 동작하여 정보를 제대로 가져온다면 Monitoring의 오른쪽 그래프 윗부분에서 다음과 같은 화면을 볼 수 있다.

stackdriver-2-image12

[ 출처: Flickr, gongjak1 ]

6.현재 모니터링 가능한 항목

  • Active Connections (count): The number of active connections currently attached to Nginx.
  • Reading Connections (count): The number of reading connections currently attached to Nginx.
  • Writing Connections (count): The number of writing connections currently attached to Nginx.
  • Waiting Connections (count): The number of waiting connections currently attached to Nginx.
  • Requests (count/s): The number of requests per second Nginx is servicing.

답글 남기기

아래 항목을 채우거나 오른쪽 아이콘 중 하나를 클릭하여 로그 인 하세요:

WordPress.com 로고

WordPress.com의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

Facebook 사진

Facebook의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

%s에 연결하는 중

%d 블로거가 이것을 좋아합니다: