github.com/netdata/go.d.plugin@v0.58.1/modules/tengine/integrations/tengine.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/tengine/README.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/tengine/metadata.yaml" 4 sidebar_label: "Tengine" 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 # Tengine 12 13 14 <img src="https://netdata.cloud/img/tengine.jpeg" width="150"/> 15 16 17 Plugin: go.d.plugin 18 Module: tengine 19 20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> 21 22 ## Overview 23 24 This collector monitors Tengine 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 Tengine 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 | tengine.bandwidth_total | in, out | B/s | 68 | tengine.connections_total | accepted | connections/s | 69 | tengine.requests_total | processed | requests/s | 70 | tengine.requests_per_response_code_family_total | 2xx, 3xx, 4xx, 5xx, other | requests/s | 71 | tengine.requests_per_response_code_detailed_total | 200, 206, 302, 304, 403, 404, 419, 499, 500, 502, 503, 504, 508, other | requests/s | 72 | tengine.requests_upstream_total | requests | requests/s | 73 | tengine.tries_upstream_total | calls | calls/s | 74 | tengine.requests_upstream_per_response_code_family_total | 4xx, 5xx | requests/s | 75 76 77 78 ## Alerts 79 80 There are no alerts configured by default for this integration. 81 82 83 ## Setup 84 85 ### Prerequisites 86 87 #### Enable ngx_http_reqstat_module module. 88 89 To enable the module, see the [official documentation](ngx_http_reqstat_module](https://tengine.taobao.org/document/http_reqstat.html). 90 The default line format is the only supported format. 91 92 93 94 ### Configuration 95 96 #### File 97 98 The configuration file name for this integration is `go.d/tengine.conf`. 99 100 101 You can edit the configuration file using the `edit-config` script from the 102 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). 103 104 ```bash 105 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata 106 sudo ./edit-config go.d/tengine.conf 107 ``` 108 #### Options 109 110 The following options can be defined globally: update_every, autodetection_retry. 111 112 113 <details><summary>Config options</summary> 114 115 | Name | Description | Default | Required | 116 |:----|:-----------|:-------|:--------:| 117 | update_every | Data collection frequency. | 1 | no | 118 | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | 119 | url | Server URL. | http://127.0.0.1/us | yes | 120 | timeout | HTTP request timeout. | 2 | no | 121 | username | Username for basic HTTP authentication. | | no | 122 | password | Password for basic HTTP authentication. | | no | 123 | proxy_url | Proxy URL. | | no | 124 | proxy_username | Username for proxy basic HTTP authentication. | | no | 125 | proxy_password | Password for proxy basic HTTP authentication. | | no | 126 | method | HTTP request method. | GET | no | 127 | body | HTTP request body. | | no | 128 | headers | HTTP request headers. | | no | 129 | not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no | 130 | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no | 131 | tls_ca | Certification authority that the client uses when verifying the server's certificates. | | no | 132 | tls_cert | Client TLS certificate. | | no | 133 | tls_key | Client TLS key. | | no | 134 135 </details> 136 137 #### Examples 138 139 ##### Basic 140 141 An example configuration. 142 143 <details><summary>Config</summary> 144 145 ```yaml 146 jobs: 147 - name: local 148 url: http://127.0.0.1/us 149 150 ``` 151 </details> 152 153 ##### HTTP authentication 154 155 Local server with basic HTTP authentication. 156 157 <details><summary>Config</summary> 158 159 ```yaml 160 jobs: 161 - name: local 162 url: http://127.0.0.1/us 163 username: foo 164 password: bar 165 166 ``` 167 </details> 168 169 ##### HTTPS with self-signed certificate 170 171 Tengine with enabled HTTPS and self-signed certificate. 172 173 <details><summary>Config</summary> 174 175 ```yaml 176 jobs: 177 - name: local 178 url: https://127.0.0.1/us 179 tls_skip_verify: yes 180 181 ``` 182 </details> 183 184 ##### Multi-instance 185 186 > **Note**: When you define multiple jobs, their names must be unique. 187 188 Local and remote instances. 189 190 191 <details><summary>Config</summary> 192 193 ```yaml 194 jobs: 195 - name: local 196 url: http://127.0.0.1/us 197 198 - name: remote 199 url: http://203.0.113.10/us 200 201 ``` 202 </details> 203 204 205 206 ## Troubleshooting 207 208 ### Debug Mode 209 210 To troubleshoot issues with the `tengine` collector, run the `go.d.plugin` with the debug option enabled. The output 211 should give you clues as to why the collector isn't working. 212 213 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on 214 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. 215 216 ```bash 217 cd /usr/libexec/netdata/plugins.d/ 218 ``` 219 220 - Switch to the `netdata` user. 221 222 ```bash 223 sudo -u netdata -s 224 ``` 225 226 - Run the `go.d.plugin` to debug the collector: 227 228 ```bash 229 ./go.d.plugin -d -m tengine 230 ``` 231 232