Amplify merupakan salah satu software untuk monitoring nginx.
1. Hal pertama yang dilakukan adalah daftar pada website amplify
2. Install amplify agent pada web server
# yum install amplify-agent
http {
log_format main_ext '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'"$host" sn="$server_name" '
'rt=$request_time '
'ua="$upstream_addr" us="$upstream_status" '
'ut="$upstream_response_time" ul="$upstream_response_length" '
'cs=$upstream_cache_status';
access_log /var/log/nginx/access.log main_ext;
error_log /var/log/nginx/error.log warn;
server {
listen 8080;
server_name 127.0.0.1;
location /nginx_status {
stub_status on;
allow 127.0.0.1;
deny all;
}
}
# service amplify-agent start
# service amplify-agent stop
# service amplify-agent restart
# ps ax | grep -i 'amplify\-'
13536 ? S 0:01 amplify-agent
Atau
# ps aux | grep amplify