What's up docker? How to keep your containers up to date

Awesome! Thanks!

Hi,

Version 4.1.0 is out! :tada:

Significant changes.

  • Watching for digest change is now an opt-in feature (see here how to configure and why it’s disabled by default)
  • Digest computation & comparison should now be working for Arch other than amd64
  • HA sensors associated are now automatically removed when the associated container is deleted

Please remove wud state (if you mount it from your host machine) before upgrading to avoid any side effects.

Let me know if you face any issues!

1 Like

Hello fmartinou,

Attempted to implement device/service/network monitoring in HA but it appears Prometheus has many, many more integrations… so now I’m in the process of install a “simple” Prometheus setup. Wow, Home Assistant has many rabbit holes if you’re not careful! :joy: Also decided to go with timescaleDB since PostgreSQL can handle the short-term HA DB as well as the long-term Prometheus DB. Still trying to find how to get Prometheus data in Lovelace graphs. If anyone has done this without using a Grafana iFrame please shoot me DM.

Anyway, looking at the wud_image gauge in the documentation and noticed there doesn’t appear to be an indication that a container update is available. At least there is no clear indication like a flag, update_available=true. Don’t anything in the /metrics output from my WUD instance running v4.1.1 either.

Am I missing something or is assumed the user need to will check if “result_tag” is greater than “tag”? Would be great if this can be added to /metrics since WUD already has this logic and this is its core function.

Thanks!

Hi @mwolter,
The gauge metrics contain a simple to_be_updated="true | false whether the image can be updated.
Isn’t the one you’re looking for?

From the documentation, you need to scroll a little bit to the right because the property is the last one on the line.


# HELP wud_images The watched images
# TYPE wud_images gauge
wud_images{registry="hub",registry_url="https://registry-1.docker.io/v2",image="library/nginx",version="1.10",version_date="2017-03-03T22:03:51.199773111Z",architecture="amd64",os="linux",size="54042627",is_semver="true",include_tags="^\d+\.\d+$",exclude_tags="undefined",new_version="1.19", to_be_updated="true"} 1

You’re right, thanks! Looks like something might have changed from 4.0.2 to 4.1.1. Check my clipboard history and on v.4.0.2 11 containers had to_be_updated=“true”. I disregarded it as that key did not appear to correlate to anything as in reality there were only four that needed to be updated. Checked again and v.4.1.1 is correct.

Thanks again!

Yeah, there were some issues regarding digests computation/comparison in 4.0; that’s certainly why you had false positive.
In 4.1, it should be more accurate.

Anyway, glad to see that it works well for you!

Hi @fmartinou,

What include tag would you recommend for timescaledev/timescaledb-ha:pg12.6-ts2.1.0-p1? This container includes postgres as well as timeseriesDB and the tag indicates the version of each. It also indicates the version of the container itself (p1).

Created the following, but not sure if it will work properly.

wud.tag.include=^pg\d+\.\d+-ts\d+\.\d+\.\d+-p\d+$$

Your regex is fine and will only catch the versions you’re interested in as expected.

However, the problem with those tags is that they combine multiple versions at once.

When wud’ll try to detect if the tag is semver or not, it will find that the tag can be coerced as 12.6.0 so the image will report an update only when a new postgres version will be available :confused:

The good news is that I just slighty tuned the comparison algo and now it reports as expected for your case :slight_smile:

You can try it by yourself the version fmartinou/whats-up-docker:4.1.2

(see the example below when running a previous version of timescaledb)

    timescaledb:
        image: timescaledev/timescaledb-ha:pg12.6-ts2.1.0-p1
        environment:
            - POSTGRES_PASSWORD=password
        labels:
            - wud.tag.include=^pg\d+\.\d+-ts\d+\.\d+\.\d+-p\d+$$

1 Like

What'up Docker? 5.0.0 is out :tada:

It contains 2 major updates:

  1. Reported updates are now per container (instead of per image)
  2. A brand new UI (Vue.js based)

Please notice that 5.0.0 contains breaking changes!!!
Depending on integrations you set up, you maybe need to make some adaptation.
Regarding Home-assistant, you may have to manually delete the previous WUD MQTT topics.

Feedbacks are welcome!

1 Like

Awesome! I’m a MQTT-noob. Can someone provide some instructions how to delete the previous topics?

Personally I’m using Mqtt Explorer to get a GUI on my Mqtt broker.
It’s very easy tu use, especially for this kind of operations.

Thanks! That worked great. I also really dig the new UI.

1 Like

Got the 5.0.0 running, configured cron, watchall is set to true, but shows no containers monitored. Container log shows this:


[2021-06-21T19:40:30.430Z]  INFO: whats-up-docker/7 on c19195f4f3ec: What's up Docker? is starting (version = 5.0.0),
[2021-06-21T19:40:30.433Z]  INFO: whats-up-docker/7 on c19195f4f3ec: Load DB (/store/wud.json),
[2021-06-21T19:40:30.439Z]  INFO: whats-up-docker/7 on c19195f4f3ec: Create Collection app,
[2021-06-21T19:40:30.443Z]  INFO: whats-up-docker/7 on c19195f4f3ec: Migrate data from version undefined to version 5.0.0,
[2021-06-21T19:40:30.445Z]  INFO: whats-up-docker/7 on c19195f4f3ec: Create Collection containers,
[2021-06-21T19:40:30.446Z]  INFO: whats-up-docker/7 on c19195f4f3ec: Init Prometheus module,
[2021-06-21T19:40:30.462Z]  INFO: whats-up-docker/7 on c19195f4f3ec: Register all components for provider mqtt,
[2021-06-21T19:40:30.682Z]  INFO: whats-up-docker/7 on c19195f4f3ec: Register component mosquitto of type mqtt with configuration {"url":"mqtt://192.168.1.12:1883","hass":{"enabled":true,"prefix":"homeassistant"},"topic":"wud/container"},
[2021-06-21T19:40:30.778Z]  INFO: whats-up-docker/7 on c19195f4f3ec: No Registry configured => Init a default one (Docker Hub with default options),
[2021-06-21T19:40:31.260Z]  INFO: whats-up-docker/7 on c19195f4f3ec: Register component hub of type hub with configuration {},
[2021-06-21T19:40:32.477Z]  INFO: whats-up-docker/7 on c19195f4f3ec: Register component local of type docker with configuration {"cron":"0 1 * * *","watchall":true,"socket":"/var/run/docker.sock","port":2375,"watchbydefault":true},
[2021-06-21T19:40:32.478Z]  INFO: whats-up-docker/7 on c19195f4f3ec: Schedule runner (0 1 * * *),
[2021-06-21T19:40:32.514Z]  INFO: whats-up-docker/7 on c19195f4f3ec: HTTP API exposed on port 3000,
[2021-06-21T19:40:33.527Z] ERROR: whats-up-docker/7 on c19195f4f3ec: Error when trying to get the containers list to watch (connect ENOENT /var/run/docker.sock),

What is it thar im doing wrong? Thanks in advance!

Error when trying to get the containers list to watch (connect ENOENT /var/run/docker.sock

Hi, did you mount the docker socket into the wud container as mentioned in the quick start?

docker run -d --name wud -v "/var/run/docker.sock:/var/run/docker.sock" -p 3000:3000 fmartinou/whats-up-docker

bummer, i used portainer to convert the command into gui fields. Missed that volume. After adding that, it all worked! thanks bud!

1 Like

having a problem with TLS which is being rejected. My certs have been working for HA and portainer so unsure why it post an error on WUD

Interesting, if they’re working for portainer, they should work for WUD. At least mine do. Checked with the latest version 5.1. Might be good to check a few things.

Verify they have been passed into the WUD container.

-v ~/certs:/certs \

Then double-check they are in the container with:

sudo docker exec -it <CONTAINER_NAME> sh
cd /certs

And also make sure the environment variables for the remote docker daemon are correct

-e WUD_WATCHER_HOME-ASSISTANT-LXC_HOST="192.168.8.5" \
-e WUD_WATCHER_HOME-ASSISTANT-LXC_CAFILE="/certs/ca.pem" \
-e WUD_WATCHER_HOME-ASSISTANT-LXC_CERTFILE="/certs/cert.pem" \
-e WUD_WATCHER_HOME-ASSISTANT-LXC_KEYFILE="/certs/key.pem" \

The only other thing would be if you’re running a non-rooted WUD container. Need to check the permissions on the folder if that is the case.

Unsure on how to make this work… been trying almost everything and nope it doesnt work

The error log from portainer

[2021-07-20T13:02:59.715Z]  INFO: whats-up-docker/8 on 371c6cc99373: What's up Docker? is starting (version = 5.1.0)
[2021-07-20T13:02:59.716Z]  INFO: whats-up-docker/8 on 371c6cc99373: Load DB (/store/wud.json)
[2021-07-20T13:02:59.734Z]  INFO: whats-up-docker/8 on 371c6cc99373: Init Prometheus module
[2021-07-20T13:02:59.759Z]  INFO: whats-up-docker/8 on 371c6cc99373: No Registry configured => Init a default one (Docker Hub with default options)
[2021-07-20T13:02:59.863Z]  INFO: whats-up-docker/8 on 371c6cc99373: Register component hub of type hub with configuration {}
[2021-07-20T13:03:00.243Z]  INFO: whats-up-docker/8 on 371c6cc99373: Register component hass of type docker with configuration {"port":2376,"host":"192.168.","socket":"192.168.:2376","cafile":"/certs/ca.pem","keyfile":"/certs/key.pem","certfile":"/certs/cert.pem","watchall":true,"cron":"0 * * * *","watchbydefault":true}
[2021-07-20T13:03:00.243Z]  INFO: whats-up-docker/8 on 371c6cc99373: Schedule runner (0 * * * *)
[2021-07-20T13:03:00.250Z]  INFO: whats-up-docker/8 on 371c6cc99373: HTTP API exposed on port 3000
(node:8) [DEP0152] DeprecationWarning: Custom PerformanceEntry accessors are deprecated. Please use the detail property.
(Use `node --trace-deprecation ...` to show where the warning was created)
[2021-07-20T13:03:04.354Z]  WARN: whats-up-docker/8 on 371c6cc99373: Error when trying to get the containers list to watch (connect EHOSTUNREACH 192.168.:2376)

My Docker Run

docker run -d -p 3000:3000 --name=wud --restart=always --label 'wud.tag.include=^([0-9]\d*)\.([0-9]\d*)\.([0-9]\d*)$$' -e WUD_WATCHER_hass_SOCKET=192.168:2376 -e WUD_WATCHER_hass_HOST=192.168. -e WUD_WATCHER_hass_PORT=2376 -e WUD_WATCHER_hass_CAFILE=/certs/ca.pem -e WUD_WATCHER_hass_CERTFILE=/certs/cert.pem -e WUD_WATCHER_hass_KEYFILE=/certs/key.pem -e WUD_WATCHER_hass_WATCHALL=true -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/services/whatsupdocker/store:/store -v /usr/share/hassio/docker/certs/key.pem:/certs/key.pem -v /usr/share/hassio/docker/certs/ca.pem:/certs/ca.pem -v /usr/share/hassio/docker/certs/cert.pem:/certs/cert.pem fmartinou/whats-up-docker:5.1.0

To show that my portainer able to get remote docker

Really want WUD to work since I change all my docker to the right version

You are missing the second half of the IP address.

what do you mean? I just delete the IP for posting here… but otherwise I wrote the IP correctly