Fixed topic scheme

parent 7df46782
......@@ -57,7 +57,7 @@ public class NFRTool {
String ipWifi = "192.168.67.81";
String ipLte = "172.10.0.2";
//String ipEth = "192.168.137.17"; // TODO: check value
String ipEth = "192.168.152.157"; // TODO: check value
String ipEth = "10.0.2.15"; // TODO: check value
float cpuThreshold = 0;
float energyThreshold = 0;
float signalWifi = -30;
......
......@@ -42,6 +42,7 @@ public abstract class ResourceManager extends TimerTask {
Enumeration<InetAddress> addresses = netint.getInetAddresses();
for (InetAddress addr : Collections.list(addresses)) {
if (addr instanceof Inet4Address)
System.out.printf("%s: %s\n", netint.getName(), addr.getHostAddress());
this.ownInterfaces.put(netint.getName(), addr.getHostAddress());
}
}
......
......@@ -36,11 +36,11 @@ import utils.FileUtils;
public class ResourceManagerCommsTask extends ResourceManager implements MqttCallback {
private static final String PUBLISH_TOPIC = "/some/mqtt/topic";
private static final String SUBSCRIBE_TOPIC = "/some/other/mqtt/topic";
private static final String PUBLISH_TOPIC = "konnekt/v3/telemetryELASTIC/peers";
private static final String SUBSCRIBE_TOPIC = "konnekt/v3/telemetryELASTIC/telemetry/net";
private MqttClient mqttClient;
private ObjectMapper mapper;
private final ObjectMapper mapper;
private final FileUtils fileUtils;
......
......@@ -93,6 +93,19 @@ services:
- MQTT_BROKER_URL=tcp://localhost:1883
restart: on-failure
telemetry:
image: konnektbox-telemetry
container_name: telem
network_mode: "host"
hostname: telem
environment:
- MQTT_ID=telemetryELASTIC
- MQTT_HOST=localhost
- MQTT_PORT=1883
- MQTT_PROTOCOL="tcp"
- MONITOR_PERIOD=1
- PEER_LIST={"enp0s3":["www.konnekt.ikerlan.es", "8.8.8.8"]}
volumes:
dataclay-init:
driver: local
......
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment