This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
#required libraries | |
import sys | |
import ssl | |
import paho.mqtt.client as mqtt | |
#called while client tries to establish connection with the server | |
def on_connect(mqttc, obj, flags, rc): | |
if rc==0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
FLINT_HOSTNAME="flint-hostname" | |
FLINT_USERNAME="flint-username" | |
FLINT_PASSWORD="flint-password" | |
FLINTBIT="flintbit" | |
FLINTBIT_PARAMS="flintbit_params" | |
consul_http_protocol="http" | |
consul_hostname="localhost" | |
consul_http_port="8500" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"service": { | |
"name": "apache2", | |
"address": "192.168.2.11", | |
"port": 80, | |
"check": { | |
"script": "service apache2 status", | |
"interval": "10s" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python3 iot-mqtt-subscriber.py | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
#required libraries | |
import sys | |
import ssl | |
import paho.mqtt.client as mqtt | |
#called while client tries to establish connection with the server | |
def on_connect(mqttc, obj, flags, rc): | |
if rc==0: |