github.com/netdata/go.d.plugin@v0.58.1/modules/nginxplus/integrations/nginx_plus.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/nginxplus/README.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/nginxplus/metadata.yaml" 4 sidebar_label: "NGINX Plus" 5 learn_status: "Published" 6 learn_rel_path: "Data Collection/Web Servers and Web Proxies" 7 most_popular: False 8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" 9 endmeta--> 10 11 # NGINX Plus 12 13 14 <img src="https://netdata.cloud/img/nginxplus.svg" width="150"/> 15 16 17 Plugin: go.d.plugin 18 Module: nginxplus 19 20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> 21 22 ## Overview 23 24 This collector monitors NGINX Plus servers. 25 26 27 28 29 This collector is supported on all platforms. 30 31 This collector supports collecting metrics from multiple instances of this integration, including remote instances. 32 33 34 ### Default Behavior 35 36 #### Auto-Detection 37 38 This integration doesn't support auto-detection. 39 40 #### Limits 41 42 The default configuration for this integration does not impose any limits on data collection. 43 44 #### Performance Impact 45 46 The default configuration for this integration is not expected to impose a significant performance impact on the system. 47 48 49 ## Metrics 50 51 Metrics grouped by *scope*. 52 53 The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. 54 55 56 57 ### Per NGINX Plus instance 58 59 These metrics refer to the entire monitored application. 60 61 This scope has no labels. 62 63 Metrics: 64 65 | Metric | Dimensions | Unit | 66 |:------|:----------|:----| 67 | nginxplus.client_connections_rate | accepted, dropped | connections/s | 68 | nginxplus.client_connections_count | active, idle | connections | 69 | nginxplus.ssl_handshakes_rate | successful, failed | handshakes/s | 70 | nginxplus.ssl_handshakes_failures_rate | no_common_protocol, no_common_cipher, timeout, peer_rejected_cert | failures/s | 71 | nginxplus.ssl_verification_errors_rate | no_cert, expired_cert, revoked_cert, hostname_mismatch, other | errors/s | 72 | nginxplus.ssl_session_reuses_rate | ssl_session | reuses/s | 73 | nginxplus.http_requests_rate | requests | requests/s | 74 | nginxplus.http_requests_count | requests | requests | 75 | nginxplus.uptime | uptime | seconds | 76 77 ### Per http server zone 78 79 These metrics refer to the HTTP server zone. 80 81 Labels: 82 83 | Label | Description | 84 |:-----------|:----------------| 85 | http_server_zone | HTTP server zone name | 86 87 Metrics: 88 89 | Metric | Dimensions | Unit | 90 |:------|:----------|:----| 91 | nginxplus.http_server_zone_requests_rate | requests | requests/s | 92 | nginxplus.http_server_zone_responses_per_code_class_rate | 1xx, 2xx, 3xx, 4xx, 5xx | responses/s | 93 | nginxplus.http_server_zone_traffic_rate | received, sent | bytes/s | 94 | nginxplus.http_server_zone_requests_processing_count | processing | requests | 95 | nginxplus.http_server_zone_requests_discarded_rate | discarded | requests/s | 96 97 ### Per http location zone 98 99 These metrics refer to the HTTP location zone. 100 101 Labels: 102 103 | Label | Description | 104 |:-----------|:----------------| 105 | http_location_zone | HTTP location zone name | 106 107 Metrics: 108 109 | Metric | Dimensions | Unit | 110 |:------|:----------|:----| 111 | nginxplus.http_location_zone_requests_rate | requests | requests/s | 112 | nginxplus.http_location_zone_responses_per_code_class_rate | 1xx, 2xx, 3xx, 4xx, 5xx | responses/s | 113 | nginxplus.http_location_zone_traffic_rate | received, sent | bytes/s | 114 | nginxplus.http_location_zone_requests_discarded_rate | discarded | requests/s | 115 116 ### Per http upstream 117 118 These metrics refer to the HTTP upstream. 119 120 Labels: 121 122 | Label | Description | 123 |:-----------|:----------------| 124 | http_upstream_name | HTTP upstream name | 125 | http_upstream_zone | HTTP upstream zone name | 126 127 Metrics: 128 129 | Metric | Dimensions | Unit | 130 |:------|:----------|:----| 131 | nginxplus.http_upstream_peers_count | peers | peers | 132 | nginxplus.http_upstream_zombies_count | zombie | servers | 133 | nginxplus.http_upstream_keepalive_count | keepalive | connections | 134 135 ### Per http upstream server 136 137 These metrics refer to the HTTP upstream server. 138 139 Labels: 140 141 | Label | Description | 142 |:-----------|:----------------| 143 | http_upstream_name | HTTP upstream name | 144 | http_upstream_zone | HTTP upstream zone name | 145 | http_upstream_server_address | HTTP upstream server address (e.g. 127.0.0.1:81) | 146 | http_upstream_server_name | HTTP upstream server name | 147 148 Metrics: 149 150 | Metric | Dimensions | Unit | 151 |:------|:----------|:----| 152 | nginxplus.http_upstream_server_requests_rate | requests | requests/s | 153 | nginxplus.http_upstream_server_responses_per_code_class_rate | 1xx, 2xx, 3xx, 4xx, 5xx | responses/s | 154 | nginxplus.http_upstream_server_response_time | response | milliseconds | 155 | nginxplus.http_upstream_server_response_header_time | header | milliseconds | 156 | nginxplus.http_upstream_server_traffic_rate | received, sent | bytes/s | 157 | nginxplus.http_upstream_server_state | up, down, draining, unavail, checking, unhealthy | state | 158 | nginxplus.http_upstream_server_connections_count | active | connections | 159 | nginxplus.http_upstream_server_downtime | downtime | seconds | 160 161 ### Per http cache 162 163 These metrics refer to the HTTP cache. 164 165 Labels: 166 167 | Label | Description | 168 |:-----------|:----------------| 169 | http_cache | HTTP cache name | 170 171 Metrics: 172 173 | Metric | Dimensions | Unit | 174 |:------|:----------|:----| 175 | nginxplus.http_cache_state | warm, cold | state | 176 | nginxplus.http_cache_iops | served, written, bypass | responses/s | 177 | nginxplus.http_cache_io | served, written, bypass | bytes/s | 178 | nginxplus.http_cache_size | size | bytes | 179 180 ### Per stream server zone 181 182 These metrics refer to the Stream server zone. 183 184 Labels: 185 186 | Label | Description | 187 |:-----------|:----------------| 188 | stream_server_zone | Stream server zone name | 189 190 Metrics: 191 192 | Metric | Dimensions | Unit | 193 |:------|:----------|:----| 194 | nginxplus.stream_server_zone_connections_rate | accepted | connections/s | 195 | nginxplus.stream_server_zone_sessions_per_code_class_rate | 2xx, 4xx, 5xx | sessions/s | 196 | nginxplus.stream_server_zone_traffic_rate | received, sent | bytes/s | 197 | nginxplus.stream_server_zone_connections_processing_count | processing | connections | 198 | nginxplus.stream_server_zone_connections_discarded_rate | discarded | connections/s | 199 200 ### Per stream upstream 201 202 These metrics refer to the Stream upstream. 203 204 Labels: 205 206 | Label | Description | 207 |:-----------|:----------------| 208 | stream_upstream_name | Stream upstream name | 209 | stream_upstream_zone | Stream upstream zone name | 210 211 Metrics: 212 213 | Metric | Dimensions | Unit | 214 |:------|:----------|:----| 215 | nginxplus.stream_upstream_peers_count | peers | peers | 216 | nginxplus.stream_upstream_zombies_count | zombie | servers | 217 218 ### Per stream upstream server 219 220 These metrics refer to the Stream upstream server. 221 222 Labels: 223 224 | Label | Description | 225 |:-----------|:----------------| 226 | stream_upstream_name | Stream upstream name | 227 | stream_upstream_zone | Stream upstream zone name | 228 | stream_upstream_server_address | Stream upstream server address (e.g. 127.0.0.1:12346) | 229 | stream_upstream_server_name | Stream upstream server name | 230 231 Metrics: 232 233 | Metric | Dimensions | Unit | 234 |:------|:----------|:----| 235 | nginxplus.stream_upstream_server_connections_rate | forwarded | connections/s | 236 | nginxplus.stream_upstream_server_traffic_rate | received, sent | bytes/s | 237 | nginxplus.stream_upstream_server_state | up, down, unavail, checking, unhealthy | state | 238 | nginxplus.stream_upstream_server_downtime | downtime | seconds | 239 | nginxplus.stream_upstream_server_connections_count | active | connections | 240 241 ### Per resolver zone 242 243 These metrics refer to the resolver zone. 244 245 Labels: 246 247 | Label | Description | 248 |:-----------|:----------------| 249 | resolver_zone | resolver zone name | 250 251 Metrics: 252 253 | Metric | Dimensions | Unit | 254 |:------|:----------|:----| 255 | nginxplus.resolver_zone_requests_rate | name, srv, addr | requests/s | 256 | nginxplus.resolver_zone_responses_rate | noerror, formerr, servfail, nxdomain, notimp, refused, timedout, unknown | responses/s | 257 258 259 260 ## Alerts 261 262 There are no alerts configured by default for this integration. 263 264 265 ## Setup 266 267 ### Prerequisites 268 269 #### Config API 270 271 To configure API, see the [official documentation](https://docs.nginx.com/nginx/admin-guide/monitoring/live-activity-monitoring/#configuring-the-api). 272 273 274 275 ### Configuration 276 277 #### File 278 279 The configuration file name for this integration is `go.d/nginxplus.conf`. 280 281 282 You can edit the configuration file using the `edit-config` script from the 283 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). 284 285 ```bash 286 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata 287 sudo ./edit-config go.d/nginxplus.conf 288 ``` 289 #### Options 290 291 The following options can be defined globally: update_every, autodetection_retry. 292 293 294 <details><summary>Config options</summary> 295 296 | Name | Description | Default | Required | 297 |:----|:-----------|:-------|:--------:| 298 | update_every | Data collection frequency. | 1 | no | 299 | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | 300 | url | Server URL. | http://127.0.0.1 | yes | 301 | timeout | HTTP request timeout. | 1 | no | 302 | username | Username for basic HTTP authentication. | | no | 303 | password | Password for basic HTTP authentication. | | no | 304 | proxy_url | Proxy URL. | | no | 305 | proxy_username | Username for proxy basic HTTP authentication. | | no | 306 | proxy_password | Password for proxy basic HTTP authentication. | | no | 307 | method | HTTP request method. | GET | no | 308 | body | HTTP request body. | | no | 309 | headers | HTTP request headers. | | no | 310 | not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no | 311 | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no | 312 | tls_ca | Certification authority that the client uses when verifying the server's certificates. | | no | 313 | tls_cert | Client TLS certificate. | | no | 314 | tls_key | Client TLS key. | | no | 315 316 </details> 317 318 #### Examples 319 320 ##### Basic 321 322 A basic example configuration. 323 324 <details><summary>Config</summary> 325 326 ```yaml 327 jobs: 328 - name: local 329 url: http://127.0.0.1 330 331 ``` 332 </details> 333 334 ##### HTTP authentication 335 336 Basic HTTP authentication. 337 338 <details><summary>Config</summary> 339 340 ```yaml 341 jobs: 342 - name: local 343 url: http://127.0.0.1 344 username: username 345 password: password 346 347 ``` 348 </details> 349 350 ##### HTTPS with self-signed certificate 351 352 NGINX Plus with enabled HTTPS and self-signed certificate. 353 354 <details><summary>Config</summary> 355 356 ```yaml 357 jobs: 358 - name: local 359 url: https://127.0.0.1 360 tls_skip_verify: yes 361 362 ``` 363 </details> 364 365 ##### Multi-instance 366 367 > **Note**: When you define multiple jobs, their names must be unique. 368 369 Collecting metrics from local and remote instances. 370 371 372 <details><summary>Config</summary> 373 374 ```yaml 375 jobs: 376 - name: local 377 url: http://127.0.0.1 378 379 - name: remote 380 url: http://192.0.2.1 381 382 ``` 383 </details> 384 385 386 387 ## Troubleshooting 388 389 ### Debug Mode 390 391 To troubleshoot issues with the `nginxplus` collector, run the `go.d.plugin` with the debug option enabled. The output 392 should give you clues as to why the collector isn't working. 393 394 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on 395 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. 396 397 ```bash 398 cd /usr/libexec/netdata/plugins.d/ 399 ``` 400 401 - Switch to the `netdata` user. 402 403 ```bash 404 sudo -u netdata -s 405 ``` 406 407 - Run the `go.d.plugin` to debug the collector: 408 409 ```bash 410 ./go.d.plugin -d -m nginxplus 411 ``` 412 413