github.com/netdata/go.d.plugin@v0.58.1/modules/nginxvts/integrations/nginx_vts.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/nginxvts/README.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/nginxvts/metadata.yaml" 4 sidebar_label: "NGINX VTS" 5 learn_status: "Published" 6 learn_rel_path: "Data Collection/Web Servers and Web Proxies" 7 most_popular: True 8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" 9 endmeta--> 10 11 # NGINX VTS 12 13 14 <img src="https://netdata.cloud/img/nginx.svg" width="150"/> 15 16 17 Plugin: go.d.plugin 18 Module: nginxvts 19 20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> 21 22 ## Overview 23 24 This collector monitors NGINX servers with [virtual host traffic status module](https://github.com/vozlt/nginx-module-vts). 25 26 27 It sends HTTP requests to the NGINX VTS location [status](https://github.com/vozlt/nginx-module-vts#synopsis), 28 which is a built-in location that provides metrics about the NGINX VTS server. 29 30 31 This collector is supported on all platforms. 32 33 This collector supports collecting metrics from multiple instances of this integration, including remote instances. 34 35 36 ### Default Behavior 37 38 #### Auto-Detection 39 40 By default, it detects NGINX instances running on localhost. 41 42 43 #### Limits 44 45 The default configuration for this integration does not impose any limits on data collection. 46 47 #### Performance Impact 48 49 The default configuration for this integration is not expected to impose a significant performance impact on the system. 50 51 52 ## Metrics 53 54 Metrics grouped by *scope*. 55 56 The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. 57 58 59 60 ### Per NGINX VTS instance 61 62 These metrics refer to the entire monitored application. 63 64 This scope has no labels. 65 66 Metrics: 67 68 | Metric | Dimensions | Unit | 69 |:------|:----------|:----| 70 | nginxvts.requests_total | requests | requests/s | 71 | nginxvts.active_connections | active | connections | 72 | nginxvts.connections_total | reading, writing, waiting, accepted, handled | connections/s | 73 | nginxvts.uptime | uptime | seconds | 74 | nginxvts.shm_usage | max, used | bytes | 75 | nginxvts.shm_used_node | used | nodes | 76 | nginxvts.server_requests_total | requests | requests/s | 77 | nginxvts.server_responses_total | 1xx, 2xx, 3xx, 4xx, 5xx | responses/s | 78 | nginxvts.server_traffic_total | in, out | bytes/s | 79 | nginxvts.server_cache_total | miss, bypass, expired, stale, updating, revalidated, hit, scarce | events/s | 80 81 82 83 ## Alerts 84 85 There are no alerts configured by default for this integration. 86 87 88 ## Setup 89 90 ### Prerequisites 91 92 #### Configure nginx-vts module 93 94 To configure nginx-vts, see the [https://github.com/vozlt/nginx-module-vts#installation). 95 96 97 98 ### Configuration 99 100 #### File 101 102 The configuration file name for this integration is `go.d/nginxvts.conf`. 103 104 105 You can edit the configuration file using the `edit-config` script from the 106 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). 107 108 ```bash 109 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata 110 sudo ./edit-config go.d/nginxvts.conf 111 ``` 112 #### Options 113 114 The following options can be defined globally: update_every, autodetection_retry. 115 116 117 <details><summary>Config options</summary> 118 119 | Name | Description | Default | Required | 120 |:----|:-----------|:-------|:--------:| 121 | update_every | Data collection frequency. | 1 | no | 122 | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | 123 | url | Server URL. | http://127.0.0.1/status/format/json | yes | 124 | timeout | HTTP request timeout. | 1 | no | 125 | username | Username for basic HTTP authentication. | | no | 126 | password | Password for basic HTTP authentication. | | no | 127 | proxy_url | Proxy URL. | | no | 128 | proxy_username | Username for proxy basic HTTP authentication. | | no | 129 | proxy_password | Password for proxy basic HTTP authentication. | | no | 130 | method | HTTP request method. | GET | no | 131 | body | HTTP request body. | | no | 132 | headers | HTTP request headers. | | no | 133 | not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no | 134 | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no | 135 | tls_ca | Certification authority that the client uses when verifying the server's certificates. | | no | 136 | tls_cert | Client TLS certificate. | | no | 137 | tls_key | Client TLS key. | | no | 138 139 </details> 140 141 #### Examples 142 143 ##### Basic 144 145 A basic example configuration. 146 147 ```yaml 148 jobs: 149 - name: local 150 url: http://127.0.0.1/status/format/json 151 152 ``` 153 ##### HTTP authentication 154 155 Basic HTTP authentication. 156 157 <details><summary>Config</summary> 158 159 ```yaml 160 jobs: 161 - name: local 162 url: http://127.0.0.1/server-status?auto 163 username: username 164 password: password 165 166 ``` 167 </details> 168 169 ##### HTTPS with self-signed certificate 170 171 Do not validate server certificate chain and hostname. 172 173 174 <details><summary>Config</summary> 175 176 ```yaml 177 jobs: 178 - name: local 179 url: https://127.0.0.1/status/format/json 180 tls_skip_verify: yes 181 182 ``` 183 </details> 184 185 ##### Multi-instance 186 187 > **Note**: When you define multiple jobs, their names must be unique. 188 189 Collecting metrics from local and remote instances. 190 191 192 <details><summary>Config</summary> 193 194 ```yaml 195 jobs: 196 - name: local 197 url: http://127.0.0.1/status/format/json 198 199 - name: remote 200 url: http://192.0.2.1/status/format/json 201 202 ``` 203 </details> 204 205 206 207 ## Troubleshooting 208 209 ### Debug Mode 210 211 To troubleshoot issues with the `nginxvts` collector, run the `go.d.plugin` with the debug option enabled. The output 212 should give you clues as to why the collector isn't working. 213 214 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on 215 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. 216 217 ```bash 218 cd /usr/libexec/netdata/plugins.d/ 219 ``` 220 221 - Switch to the `netdata` user. 222 223 ```bash 224 sudo -u netdata -s 225 ``` 226 227 - Run the `go.d.plugin` to debug the collector: 228 229 ```bash 230 ./go.d.plugin -d -m nginxvts 231 ``` 232 233