You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have set up Watchtower to monitor and update Docker containers on my network, and I'm using a Flask application to receive webhook notifications from Watchtower. These notifications are then supposed to be published to an MQTT topic. However, it seems that the notifications are not being received by the Flask application, and consequently, no MQTT messages are being published.
Flash script
import paho.mqtt.publish as publish # MQTT library
import requests # For receiving Watchtower webhooks
from datetime import datetime
from flask import Flask, request # Using Flask for the web server
# MQTT Configuration
MQTT_BROKER = "192.168.1.107" # Replace with your MQTT broker's IP address
MQTT_PORT = 1883
MQTT_TOPIC = "watchtower/updates"
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def handle_webhook():
data = request.json # Get data from Watchtower
container_name = data['container']
image = data['image']
status = data['status']
message = f"Container: {container_name}, Image: {image}, Status: {status}"
publish.single(MQTT_TOPIC, message, hostname=MQTT_BROKER, port=MQTT_PORT)
return 'Webhook received!', 200 # Response to Watchtower
if __name__ == '__main__':
app.run(host='100.108.86.59', port=8080)
Based on the details you've provided, here's a structured issue for posting on GitHub. Make sure to replace any placeholders with the appropriate values if needed:
Title: Watchtower Webhook Notifications Not Triggering MQTT Messages
Description
I have set up Watchtower to monitor and update Docker containers on my network, and I'm using a Flask application to receive webhook notifications from Watchtower. These notifications are then supposed to be published to an MQTT topic. However, it seems that the notifications are not being received by the Flask application, and consequently, no MQTT messages are being published.
Environment
All services are running on the same network, and manual POST requests to the Flask application's webhook URL successfully trigger MQTT messages.
The MQTT broker is functioning correctly, as tested with other publishers and subscribers.
I would appreciate any insights or suggestions on how to resolve this issue. Thank you!
Expected behavior
When Watchtower detects an update for any specified container, it should send a POST request to the specified webhook URL, which would be received by the Flask application. The Flask application would then publish a message to the MQTT topic.
Actual Behavior
The logs indicate that Watchtower is configured not to use any notifications (notify=no), which seems incorrect given my environment variables specifying the webhook URL and method. As a result, the Flask application does not receive any POST requests from Watchtower, and no MQTT messages are published.
time="2024-02-25T21:23:35+02:00" level=info msg="Watchtower 1.7.1" notify=no
time="2024-02-25T21:23:35+02:00" level=info msg="Using no notifications" notify=no
...
time="2024-02-25T21:23:35+02:00" level=info msg="Note that the first check will be performed in 23 hours, 21 minutes, 24 seconds" notify=no
Additional context
No response
The text was updated successfully, but these errors were encountered:
Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏
Describe the bug
Description
I have set up Watchtower to monitor and update Docker containers on my network, and I'm using a Flask application to receive webhook notifications from Watchtower. These notifications are then supposed to be published to an MQTT topic. However, it seems that the notifications are not being received by the Flask application, and consequently, no MQTT messages are being published.
Flash script
Docker compose file
Steps to reproduce
Based on the details you've provided, here's a structured issue for posting on GitHub. Make sure to replace any placeholders with the appropriate values if needed:
Title: Watchtower Webhook Notifications Not Triggering MQTT Messages
Description
I have set up Watchtower to monitor and update Docker containers on my network, and I'm using a Flask application to receive webhook notifications from Watchtower. These notifications are then supposed to be published to an MQTT topic. However, it seems that the notifications are not being received by the Flask application, and consequently, no MQTT messages are being published.
Environment
All services are running on the same network, and manual POST requests to the Flask application's webhook URL successfully trigger MQTT messages.
The MQTT broker is functioning correctly, as tested with other publishers and subscribers.
I would appreciate any insights or suggestions on how to resolve this issue. Thank you!
Expected behavior
When Watchtower detects an update for any specified container, it should send a POST request to the specified webhook URL, which would be received by the Flask application. The Flask application would then publish a message to the MQTT topic.
Actual Behavior
The logs indicate that Watchtower is configured not to use any notifications (notify=no), which seems incorrect given my environment variables specifying the webhook URL and method. As a result, the Flask application does not receive any POST requests from Watchtower, and no MQTT messages are published.
Screenshots
No response
Environment
Watchtower Version: 1.7.1
Docker Compose Version: 3.8
Operating System: (Debian linux)
Your logs
Additional context
No response
The text was updated successfully, but these errors were encountered: