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"
Note: 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.
Metrics
OpsRamp Metric | Metric Display Name | Unit | Description |
---|---|---|---|
nginx_connections_active | Connections | Active Connections | Number of all open connections including connections to backends |
nginx_connections_reading | Reading Connections | Nginx reads the request header | |
nginx_connections_writing | Writing Connections | Nginx reads the request body, processes the request or writes response to a client | |
nginx_connections_waiting | Waiting Connections | Keep-alive connections, will be active - (reading + writing) | |
nginx_requests_handled | Handled Requests | Requests | The number of requests served by connections handled by Nginx |
nginx_requests_rate | Requests Rate | Requests / second | Average number of requests per second |
nginx_connections_rate | Connections Rate | Connections / second | Average number of connections per second |
nginx_perconnections_requests | Requests Per Connection | Requests / connection | Average number of requests per connection. |
nginx_response_time | Response Time | seconds | Time taken for Nginx request-response. |
nginx_connections_dropped | Connectins Dopped Rate | Connections / second | Average number of dropped client connections. |