Add ports configs for SNMP transport to Docker scripts

This commit is contained in:
ViacheslavKlimov 2023-09-07 13:28:32 +03:00
parent f0c177ebd2
commit 1aaa017d92
3 changed files with 5 additions and 2 deletions

View File

@ -302,8 +302,8 @@ public class SnmpTransportService implements TbTransportService, CommandResponde
* *
* TODO: add check for host uniqueness when saving device (for backward compatibility - only for the ones using from-device RPC requests) * TODO: add check for host uniqueness when saving device (for backward compatibility - only for the ones using from-device RPC requests)
* *
* TODO: this won't work properly in a cluster mode, due to load-balancing of requests from devices: * NOTE: SNMP TRAPs support won't work properly when there is more than one SNMP transport,
* session might not be on this instance * due to load-balancing of requests from devices: session might not be on this instance
* */ * */
@Override @Override
public void processPdu(CommandResponderEvent event) { public void processPdu(CommandResponderEvent event) {

View File

@ -235,6 +235,8 @@ services:
tb-snmp-transport: tb-snmp-transport:
restart: always restart: always
image: "${DOCKER_REPO}/${SNMP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}" image: "${DOCKER_REPO}/${SNMP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
ports:
- "1620:1620/udp"
environment: environment:
TB_SERVICE_ID: tb-snmp-transport TB_SERVICE_ID: tb-snmp-transport
JAVA_OPTS: "${JAVA_OPTS}" JAVA_OPTS: "${JAVA_OPTS}"

View File

@ -1,6 +1,7 @@
ZOOKEEPER_ENABLED=true ZOOKEEPER_ENABLED=true
ZOOKEEPER_URL=zookeeper:2181 ZOOKEEPER_URL=zookeeper:2181
SNMP_BIND_PORT=1620
METRICS_ENABLED=true METRICS_ENABLED=true
METRICS_ENDPOINTS_EXPOSE=prometheus METRICS_ENDPOINTS_EXPOSE=prometheus
WEB_APPLICATION_ENABLE=true WEB_APPLICATION_ENABLE=true