Skip to content

add error message in applog-stream for syslog-drain validation#723

Merged
chombium merged 2 commits into
cloudfoundry:mainfrom
corporatemax:syslog-drain-error-messages
Jul 10, 2026
Merged

add error message in applog-stream for syslog-drain validation#723
chombium merged 2 commits into
cloudfoundry:mainfrom
corporatemax:syslog-drain-error-messages

Conversation

@corporatemax

@corporatemax corporatemax commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

This change moves the Syslog Drain URL validation from the Syslog Agent to the Syslog Binding Cache in order to lower down the log volume produced when there are invalid drains. The Syslog Agent is practically deployed on every VM in a foundation and up until now when an app developer didn't configure properly a Syslog drain URL, each Syslog Agent did the validation on its own and has written a log reporting the error. Now, with the move of the validation to the Syslog Binding Cache which is deployed on the Scheduler VM, the previously mentioned log load is drastically reduced, as there is only one Scheduler VM per availability zone and that the Syslog Binding Cache is updated by default every minute. Up until now, the validation in the Syslog Agent was done by default every 15 seconds. This change lowers down the number of the logs written, as well as the time interval on which the logs are written.

On top of that, from now on, the application developers will get an error message each time when they configure an invalid Syslog Drain URL.

A part from the already present log messages about dropped logs due to unreachable destination, e.g.

 2026-07-10T11:04:17.54+0200 [LGR/0] ERR 100000 messages lost for application 3ad3162f-3b41-4d9f-ba58-6c136b83c31e in user provided syslog drain with url https://localhost:112233

now they also get notified about misconfigured Syslog Drain URL, e.g.

2026-07-10T11:04:04.29+0200 [LGR/0] ERR Invalid Scheme http-sss for syslog drain url http-sss://aaa-bbb.com

This change brings a lot of benefits, but also a small breaking change: As the Syslog Drain validation was moved from the Syslog Agent to the Syslog Binding Cache, the invalid_drains and blacklisted_drains metrics have been move to the Syslog Binding Cache as well.

Note: As of now on, the Syslog Agent get only valid drain URLs and there is still Syslog Drain URL validation in the Syslog Agent to safeguard against tempered Syslog Binding Cache API. In case the validation in the Syslog Agent notices an invalid drain it will warn the operators through the logs that they have to check the Syslog Binding Cache.

Closes #579

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing performed?

  • Unit tests
  • Integration tests
  • Acceptance tests

Checklist:

  • This PR is being made against the main branch, or relevant version branch
  • I have made corresponding changes to the documentation
  • I have added testing for my changes

If you have any questions, or want to get attention for a PR or issue please reach out on the #logging-and-metrics channel in the cloudfoundry slack

@corporatemax
corporatemax requested a review from a team as a code owner July 9, 2026 13:35
- improve and optimize code

@chombium chombium left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@corporatemax Thank you very much for your contribution and the cooperation 🥳

@github-project-automation github-project-automation Bot moved this from Inbox to Pending Merge | Prioritized in Application Runtime Platform Working Group Jul 10, 2026
@chombium
chombium merged commit c3300ca into cloudfoundry:main Jul 10, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Pending Merge | Prioritized to Done in Application Runtime Platform Working Group Jul 10, 2026
jorbaum added a commit to jorbaum/cf-k8s-releases that referenced this pull request Jul 13, 2026
c0d1ngm0nk3y pushed a commit to cloudfoundry/cf-k8s-releases that referenced this pull request Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Improve application error logs about Syslog drain problems

2 participants