github.com/netdata/go.d.plugin@v0.58.1/modules/springboot2/integrations/java_spring-boot_2_applications.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/springboot2/README.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/springboot2/metadata.yaml" 4 sidebar_label: "Java Spring-boot 2 applications" 5 learn_status: "Published" 6 learn_rel_path: "Data Collection/APM" 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 # Java Spring-boot 2 applications 12 13 14 <img src="https://netdata.cloud/img/springboot.png" width="150"/> 15 16 17 Plugin: go.d.plugin 18 Module: springboot2 19 20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> 21 22 ## Overview 23 24 This collector monitors Java Spring-boot 2 applications that expose their metrics using the Spring Boot Actuator included in the Spring Boot library. 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 By default, it detects applications running on localhost. 39 40 41 #### Limits 42 43 The default configuration for this integration does not impose any limits on data collection. 44 45 #### Performance Impact 46 47 The default configuration for this integration is not expected to impose a significant performance impact on the system. 48 49 50 ## Metrics 51 52 Metrics grouped by *scope*. 53 54 The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. 55 56 57 58 ### Per Java Spring-boot 2 applications instance 59 60 These metrics refer to the entire monitored application. 61 62 This scope has no labels. 63 64 Metrics: 65 66 | Metric | Dimensions | Unit | 67 |:------|:----------|:----| 68 | springboot2.response_codes | 1xx, 2xx, 3xx, 4xx, 5xx | requests/s | 69 | springboot2.thread | daemon, total | threads | 70 | springboot2.heap | free, eden, survivor, old | B | 71 | springboot2.heap_eden | used, commited | B | 72 | springboot2.heap_survivor | used, commited | B | 73 | springboot2.heap_old | used, commited | B | 74 | springboot2.uptime | uptime | seconds | 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 #### Configure Spring Boot Actuator 88 89 The Spring Boot Actuator exposes metrics over HTTP, to use it: 90 91 - add `org.springframework.boot:spring-boot-starter-actuator` and `io.micrometer:micrometer-registry-prometheus` to your application dependencies. 92 - set `management.endpoints.web.exposure.include=*` in your `application.properties`. 93 94 Refer to the [Spring Boot Actuator: Production-ready features](https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready.html) and [81. Actuator - Part IX. ‘How-to’ guides](https://docs.spring.io/spring-boot/docs/current/reference/html/howto-actuator.html) for more information. 95 96 97 98 ### Configuration 99 100 #### File 101 102 The configuration file name for this integration is `go.d/springboot2.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/springboot2.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. | | 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:8080/actuator/prometheus 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:8080/actuator/prometheus 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:8080/actuator/prometheus 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:8080/actuator/prometheus 198 199 - name: remote 200 url: http://192.0.2.1:8080/actuator/prometheus 201 202 ``` 203 </details> 204 205 206 207 ## Troubleshooting 208 209 ### Debug Mode 210 211 To troubleshoot issues with the `springboot2` 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 springboot2 231 ``` 232 233