this post was submitted on 07 Jan 2025
19 points (88.0% liked)

Selfhosted

60967 readers
707 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

Ok so I've been having a problem with logging for a while now. I use a centralized logging platform (Seq) to try and aggregate the logs of the containers I run but most of the log messages come through as errors. This is because the containers would stream their output to stderr and even though it's formatted it comes as one big error message.

Example:

[2025-01-06 18:17:23] INFO Registering with TVA backend, encode Job status: available

That's all one big error message I receive even though it's an INFO message. And every container is different. Their error message is formatted differently, some goes to stdout instead of stderr, some actually work.

Is there a piece of software that I can run that will intercept these messages and convert them to GELF?

Thanks

you are viewing a single comment's thread
view the rest of the comments
[–] rumba@lemmy.zip 1 points 2 years ago (1 children)

I'm not sure about your exact ask, I'd probably head towards setting up logstash and elasticsearch. It might be overkill for your needs though.

[–] Eezyville@sh.itjust.works 2 points 2 years ago* (last edited 2 years ago) (1 children)

I'm not clear in the post I guess so I'll try to be more clear here.

  • I'm using Seq for my centralized logging.
  • The logs I get from most of my containers are not in GELF format. I cannot change that unless I change how logging works in all the programs I use. So I'll need to edit every source code and compile or ask each project to update their logging and output to GELF.
  • They are all shown as errors or info. It depends on the container because some send their logging info to stderr and some to stdout.
  • I'm looking for something that can intercept those logs from my other containers, format them to GELF, and send the formatted logs to Seq.
[–] rumba@lemmy.zip 4 points 2 years ago (1 children)

No I get what you're asking for I'm just mentioning that sometimes it's easier to use an application that can read multiple formats than it is to try to finagle everything back into one format.

[–] Eezyville@sh.itjust.works 1 points 2 years ago (1 children)

Yeah but the thing is I have it set up to read the logs being sent out from my Docker containers. Even though I've set the containers to output using the GELF driver they don't really do that. The log messages my container send are not in GELF format so I have to find a way to fix that.

[–] rumba@lemmy.zip 1 points 2 years ago

Best of luck with it, logging's always a severe pain in the ass.