NGINX is a web server that can also be used as a reverse proxy, load balancer, mail proxy, and HTTP cache. The software was created by Igor Sysoev and publicly released in 2004.
Prerequisites
- Add the following to
/etc/nginx/sites-available/default inside server{}
location /nginx_status {
stub_status;
allow all;
}
- For Virtual Machines, install the Linux Agent.
Configuring the credentials
Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml
nginx:
- name: nginx
user: <username>
pwd: <Password>
encoding-type: plain
labels:
key1: val1
key2: val2
Configuring the application
Virtual machine
Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml
- name: nginx
instance-checks:
service-check:
- nginx
port-check:
- 80
uri-check:
- "nginx_status"
By default, nginx_status
is considered as the URI.
Docker environment
Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml
- name: nginx
container-checks:
image-check:
- nginx
port-check:
- 80
Kubernetes environment
Configure the application in config.yaml
- name: nginx
container-checks:
image-check:
- nginx
port-check:
- 80
Validate
Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.
Supported metrics
OpsRamp Metric | Metric Display Name | Unit |
---|---|---|
nginx_connections_active Number of all open connections including connections to backends | Connections | Active Connections |
nginx_connections_reading Nginx reads the request header | Reading Connections | |
nginx_connections_writing Nginx reads the request body, processes the request or writes response to a client | Writing Connections | |
nginx_connections_waiting Keep-alive connections, is active - (reading + writing) | Waiting Connections | |
nginx_requests_handled The number of requests served by connections handled by Nginx | Handled Requests | Requests |
nginx_requests_rate Average number of requests per second | Requests Rate | Requests / second |
nginx_connections_rate Average number of connections per second | Connections Rate | Connections / second |
nginx_perconnections_requests Average number of requests per connection. | Requests Per Connection | Requests / connection |
nginx_response_time Time taken for Nginx request-response. | Response Time | seconds |
nginx_connections_dropped Average number of dropped client connections. | Connectins Dopped Rate | Connections / second |