Open taha-yassine opened 1 year ago
systemd
was updated to 252 on the latest release of HA OS (https://github.com/home-assistant/operating-system/releases/tag/10.1), I think that's the culprit.
Yep, seem to be getting the same error
@mdegat01 any chance you have an idea on how we might get around this ? I've personally come to rely on this quite a bit in my personal workflows w/ Home Assistant
looks like the promtail program used in this is built from https://github.com/mdegat01/promtail-journal which uses an earlier version of the lib systemd dev packages - (libsystemd-dev=247.3-7+deb11u1) The docker image for promtail on docker hub works with systemd, any reason not to just grab the latest version of that ?
Edit : hmm ... my host that runs that docker image is running systemd 247 so using the official version may not work for that either
Not sure what the missing component is ... upload the repo to make a local add-on and changed it to get promtail from the latest build on docker hub (I'm using this image already for a different promtail instance) but it still isn't working. As reported in the promtail ticket ... silence in the logs. One thing missing from this add-on compared to the docs for the official docker image is when using the journal scrape the promtail docker image needs /etc/machine-id from the host which isn't possible easily with the restricted options for docker containers under Hassos ... I hacked the image and added the file but that still didn't fix anything.
I suppose the next step is to go back to building promtail from source but with the right systemd dev libraries
Hah, got it working !
added :
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev
to the dockerfile to get the newer libsystemd-dev package
Planning to release a fork of the repo with your fix by any chance?
Yeah ... I was just getting the link but had a meeting :) https://github.com/LucidityCrash/addon-promtail
Worth noting it doesn't need the /etc/machine-id that the promtail docs suggested it needs and I'd added yesterday, I took that back out today and it still worked without it :)
I should say this is not a proper replacement for the add-on, I have no idea how to publish one, to use it drop the promtail folder from my repo into the /addons folder in your HA instance using an ssh add-on or something like the samba add-on. I've done nothing except modify the Dockerfile to build based on the latest versions of the official Promtail image and install the backports version of the systemd-dev package, so all the links and docs etc point to this original repo.
I've taken @LucidityCrash's fixes and published them in an add-on that you can add directly through the Home Assistant UI.
Add https://github.com/JeanMertz/addon-promtail as an add-on repository, refresh the page, and you should see "Promtail" show up.
This is a temporary forked repository, until @LucidityCrash's PR #222 is merged (once @mdegat01 is back from paternity leave 👶 🥳)
I couldn't use @JeanMertz's solution as for some reason the pre-built promtail version did not work on an Rpi2. Instead, I submitted https://github.com/mdegat01/promtail-journal/pull/140 to update the base image and had to create https://github.com/efpe/addon-promtail to use the package (under my user).
Once my PR to promtail-journal
is merged, the original way can be used to build the base.
Is there any update to keep alive this addon? @mdegat01 can you please share your plan on this addon? Just to have a clear idea about the future. if you are not going to continue to keep it maintained then please move the ownership to someone else. Thank you
What about to vote having the forked https://github.com/JeanMertz/addon-promtail as the official addon. This repo won't see any love from the author so for the goodness of the community let's move on with a fork that it is mantained.
I think that would be sub optimal ... that repo was forked from my patch which uses the official promtail image and @efpe had issues with that on his pi2 ... that said I'm not sure even given the change he proposed even worked for him as it just built promtail for armv7 and this addon builds using amd64 ?
Even taking that out of the equation any repo should probably forked from this one rather than my one so there is less confusion when trying to chase down issues/things ?
Edit : @mdegat01 is clearly still active in other Home Assistant repos, just not this one, so it is not due to his recent addition to the family, this project just isn't high enough up on his priority list - nowt wrong with that.
Perhaps we could get the ownership of this one changed. Also ideally if we do use a new repo it should be added to the community list of add-ons and have a different name to avoid confusion.
It worked for that arch and it’s a hacky way for sure. I also agree that the original repo should be forked and the patches added on top. I’m happy to test and review prs if needed :El 3 ene 2024, a las 11:44, LucidityCrash @.***> escribió: I think that would be sub optimal ... that repo was forked from my patch which uses the official promtail image and @efpe had issues with that on his pi2 ... that said I'm not sure even given the change he proposed even worked for him as it just built promtail for armv7 and this addon builds using amd64 ? Even taking that out of the equation any repo should probably forked from this one rather than my one so there is less confusion when trying to chase down issues/things ?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
I agree that ideally gaining ownership of this repo would be the best move. It would be less confusing for newcomers. However, that entirely depends on @mdegat01. Maybe we should give it some additional time to see if he would ultimately agree. Otherwise, @LucidityCrash's repo + updating the community add-ons forum post to redirect people here seems like the second best option.
Describe the bug Recently Promtail stopped sending data to my Loki instance.
To Reproduce Start Promtail addon.
Expected behavior Promtail sends data to the configured Loki endpoint.
Logs
Environment:
Additional context It could be related to https://github.com/grafana/loki/issues/8163, but I'm not very familiar with Promtail so I can't tell for sure. I tried deleteting
positions.yaml
and restarting the addon as suggested in https://github.com/grafana/loki/issues/8163#issuecomment-1384186182, but that didn't solve the problem for me.