Commit 36eef9826462eb23891eb09d5c1a21daf2024cf3

Authored by Igor Kulikov
1 parent b9c73a28

Add monitoring for lwm2m and snmp transports

@@ -949,9 +949,19 @@ @@ -949,9 +949,19 @@
949 "selected": false, 949 "selected": false,
950 "text": "tb-coap-transport", 950 "text": "tb-coap-transport",
951 "value": "tb-coap-transport" 951 "value": "tb-coap-transport"
  952 + },
  953 + {
  954 + "selected": false,
  955 + "text": "tb-lwm2m-transport",
  956 + "value": "tb-lwm2m-transport"
  957 + },
  958 + {
  959 + "selected": false,
  960 + "text": "tb-snmp-transport",
  961 + "value": "tb-snmp-transport"
952 } 962 }
953 ], 963 ],
954 - "query": "tb-core1,tb-core2,tb-rule-engine1,tb-rule-engine2,tb-mqtt-transport1,tb-mqtt-transport2,tb-http-transport1,tb-http-transport2,tb-coap-transport", 964 + "query": "tb-core1,tb-core2,tb-rule-engine1,tb-rule-engine2,tb-mqtt-transport1,tb-mqtt-transport2,tb-http-transport1,tb-http-transport2,tb-coap-transport,tb-lwm2m-transport,tb-snmp-transport",
955 "queryValue": "", 965 "queryValue": "",
956 "skipUrlSync": false, 966 "skipUrlSync": false,
957 "type": "custom" 967 "type": "custom"
@@ -979,4 +989,4 @@ @@ -979,4 +989,4 @@
979 "title": "Single Service Metrics", 989 "title": "Single Service Metrics",
980 "uid": "lewbrddddlwjerwkj", 990 "uid": "lewbrddddlwjerwkj",
981 "version": 1 991 "version": 1
982 -}  
  992 +}
@@ -70,7 +70,7 @@ scrape_configs: @@ -70,7 +70,7 @@ scrape_configs:
70 metrics_path: /actuator/prometheus 70 metrics_path: /actuator/prometheus
71 static_configs: 71 static_configs:
72 - targets: [ 'tb-http-transport1:8081' ] 72 - targets: [ 'tb-http-transport1:8081' ]
73 - - 73 +
74 - job_name: 'tb-http-transport2' 74 - job_name: 'tb-http-transport2'
75 metrics_path: /actuator/prometheus 75 metrics_path: /actuator/prometheus
76 static_configs: 76 static_configs:
@@ -81,3 +81,12 @@ scrape_configs: @@ -81,3 +81,12 @@ scrape_configs:
81 static_configs: 81 static_configs:
82 - targets: [ 'tb-coap-transport:8081' ] 82 - targets: [ 'tb-coap-transport:8081' ]
83 83
  84 + - job_name: 'tb-lwm2m-transport'
  85 + metrics_path: /actuator/prometheus
  86 + static_configs:
  87 + - targets: [ 'tb-lwm2m-transport:8081' ]
  88 +
  89 + - job_name: 'tb-snmp-transport'
  90 + metrics_path: /actuator/prometheus
  91 + static_configs:
  92 + - targets: [ 'tb-snmp-transport:8081' ]
@@ -4,3 +4,9 @@ ZOOKEEPER_URL=zookeeper:2181 @@ -4,3 +4,9 @@ ZOOKEEPER_URL=zookeeper:2181
4 LWM2M_BIND_ADDRESS=0.0.0.0 4 LWM2M_BIND_ADDRESS=0.0.0.0
5 LWM2M_BIND_PORT=5685 5 LWM2M_BIND_PORT=5685
6 LWM2M_TIMEOUT=10000 6 LWM2M_TIMEOUT=10000
  7 +
  8 +METRICS_ENABLED=true
  9 +METRICS_ENDPOINTS_EXPOSE=prometheus
  10 +WEB_APPLICATION_ENABLE=true
  11 +WEB_APPLICATION_TYPE=servlet
  12 +HTTP_BIND_PORT=8081
1 ZOOKEEPER_ENABLED=true 1 ZOOKEEPER_ENABLED=true
2 ZOOKEEPER_URL=zookeeper:2181 2 ZOOKEEPER_URL=zookeeper:2181
  3 +
  4 +METRICS_ENABLED=true
  5 +METRICS_ENDPOINTS_EXPOSE=prometheus
  6 +WEB_APPLICATION_ENABLE=true
  7 +WEB_APPLICATION_TYPE=servlet
  8 +HTTP_BIND_PORT=8081
@@ -14,6 +14,17 @@ @@ -14,6 +14,17 @@
14 # limitations under the License. 14 # limitations under the License.
15 # 15 #
16 16
  17 +# If you enabled process metrics you should also enable 'web-environment'.
  18 +spring.main.web-environment: "${WEB_APPLICATION_ENABLE:false}"
  19 +# If you enabled process metrics you should set 'web-application-type' to 'servlet' value.
  20 +spring.main.web-application-type: "${WEB_APPLICATION_TYPE:none}"
  21 +
  22 +server:
  23 + # Server bind address (has no effect if web-environment is disabled).
  24 + address: "${HTTP_BIND_ADDRESS:0.0.0.0}"
  25 + # Server bind port (has no effect if web-environment is disabled).
  26 + port: "${HTTP_BIND_PORT:8083}"
  27 +
17 # Zookeeper connection parameters. Used for service discovery. 28 # Zookeeper connection parameters. Used for service discovery.
18 zk: 29 zk:
19 # Enable/disable zookeeper discovery service. 30 # Enable/disable zookeeper discovery service.
@@ -228,4 +239,4 @@ management: @@ -228,4 +239,4 @@ management:
228 web: 239 web:
229 exposure: 240 exposure:
230 # Expose metrics endpoint (use value 'prometheus' to enable prometheus metrics). 241 # Expose metrics endpoint (use value 'prometheus' to enable prometheus metrics).
231 - include: '${METRICS_ENDPOINTS_EXPOSE:info}'  
  242 + include: '${METRICS_ENDPOINTS_EXPOSE:info}'