How to configure fluent-bit on ubuntu-core

I am using fluent-bit on ubuntu core as a collector for logs from docker containers. When I installed fluent-bit using snap, it installed as a service. I understand that the config files under /snap/fluent-bit cannot be modified as it is a read-only file system. During research I did find about snapctl, however when I run that against fluent-bit, the error message says fluent-bit has no configuration.

I new to snap, and still in the process of understanding its philosophy.

How can I run fluent-bit with custom input/output configuration on ubuntu core?

Thx

Hi @tinkertwain,

Although I never used fluent-bit snap myself, I have seen several discussions on the forum. It seems like, there is a snap but it is not fully functional and configurable.


Maybe you could try to create a bug against them about this.

this snap sadly has some glaring packaging bugs, it adds a system-files interface to read a config from $SNAP (which is just a no-op) instead of reading the hosts /etc/fluent-bit dir from it …

it should use a configure snap hook to copy $SNAP/etc/fluent-bit to a writable place like $SNAP_DATA/etc/fluent-bit if it does not exist there yet and change the command: of the service accordingly … so that it reads the config from $SNAP_DATA … that way it will be configurable on classic and core installs …

additionally it should use some more interface plugs. to actually be able to fulfill its purpose (processing logs), it should at least use the log-observe plug to abe allowed to read the logs :slight_smile:

if you open an issue, feel free to point to this thread, i’m happy to help with fixing the packaging errors …

PS: i moved the thread to the “snap” crategory since it isnt an issue with the packaging tool but with the package

@ogra, thanks a ton for clarifying this.

Opened a bug in snapcraft about this, hoping it will be taken care of.

Erm, nope … snapcraft is a tool to build snaps, it can not do anything that fixes a mis-packaged snap package, you need to open an issue on github for the fluent-bit packaging … look at the second link @bugraaydogar gave above…

Sorry, my mistake. Opened a bug in github. Thx

1 Like

Thx @bugraaydogar. Link to the github issue is very useful.

1 Like