Preparing Monitoring Component
Nginx Component
-
Nginx needs to have the
ngx_http_stub_status_modulemodule enabled. -
On each NGINX server, create a
status.conffile in the directory that contains other NGINX configuration files (e.g.,/usr/local/nginx/conf/):
status.conf
server {
listen 81;
server_name localhost;
access_log off;
# allow 127.0.0.1;
# deny all;
location /nginx_status {
# Choose your status module
# freely available with open source NGINX
stub_status;
# for open source NGINX < version 1.7.5
# stub_status on;
# available only with NGINX Plus
# status;
}
}
- Configure the
nginx.conffile by adding the following configuration block within thehttpsection:
nginx.conf
...
http {
include /usr/local/nginx/conf/status.conf;
}
Tomcat Component
The war package needs to be integrated into Tomcat. Please refer to tomcat_exporter.
-
Download the following jar packages and place them in the Tomcat lib directory:
- simpleclient
- simpleclient_common
- simpleclient_hotspot
- simpleclient_servlet
- simpleclient_servlet_common
- tomcat_exporter_client
-
Download the
tomcat_exporter_servletwar package. Click tomcat_exporter_servlet to download the war package, rename it tometrics.war, and place it in the Tomcatwebappsdirectory. -
Restart Tomcat.