Docker host comes with IP address 192.168.88.58.
docker run --name eclipse-mosquitto -p 1883:1883 -p 9001:9001 -d eclipse-mosquitto
Create agent2 container which have asupport for active checks only:
docker run --rm --name agent523 \
--net=host \
-e ZBX_ENABLEPERSISTENTBUFFER=true \
-e ZBX_PERSISTENTBUFFERPERIOD=3d \
-e ZBX_HOSTNAMEITEM="system.run[echo $(hostname -s).gnt2.lan]" \
-e ZBX_PASSIVE_ALLOW="false" \
-e ZBX_STARTAGENTS=0 \
-e ZBX_BUFFERSIZE=65535 \
-e ZBX_REFRESHACTIVECHECKS=3600 \
-e ZBX_SERVER_HOST="167.71.78.40" \
-e ZBX_SERVER_PORT="15251" \
-d zabbix/zabbix-agent2:alpine-5.2.3
Create agent item:
mqtt.get[tcp://192.168.88.58:1883,"iot/telefonica/#"]
Create a topic inside a container:
docker exec -it eclipse-mosquitto mosquitto_pub -h 127.0.0.1 -m "Another test" -t iot/telefonica/NPEX500 -d
The Zabbix item now will capture this item.
No comments:
Post a Comment