Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Official Windows build for 1.6.1 does not support built-in HTTP server #2696

Closed
swisspol opened this issue Oct 17, 2020 · 18 comments
Closed
Assignees

Comments

@swisspol
Copy link

swisspol commented Oct 17, 2020

Bug Report

Describe the bug
HTTP_Server On has no effect using Windows official build of Fluent Bit 1.6.1

To Reproduce
Use this config file and start Fluent Bit:

[SERVICE]
    HTTP_Server   On

[INPUT]
    Name         winlog
    Channels     System,Application,ThreatStack
    DB           winlog.db

[OUTPUT]
    Name            es
    Match           *
    Host            <REDACTED>
    Port            80
    Retry_Limit     5

The log indicates that the HTTP server is not started:

PS C:\FluentBit> .\fluent-bit.exe -c .\fluent-bit.conf
Fluent Bit v1.6.1
* Copyright (C) 2019-2020 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2020/10/17 07:44:11] [ info] [engine] started (pid=6324)
[2020/10/17 07:44:11] [ info] [storage] version=1.0.6, initializing...
[2020/10/17 07:44:11] [ info] [storage] in-memory
[2020/10/17 07:44:11] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2020/10/17 07:44:12] [ info] [sp] stream processor started
[2020/10/17 07:44:41] [engine] caught signal (SIGINT)
[2020/10/17 07:44:41] [ info] [input] pausing winlog.0
[2[2020/10/17 07:44:41] [error] [C:\projects\fluent-bit-2e87g\src\flb_utils.c:339 errno=0] No error
020/10/17 07:44:41] [ info] [input] pausing tail.1
[2020/10/17 07:44:41] [error] [C:\projects\fluent-bit-2e87g\src\flb_utils.c:339 errno=0] No error
[2020/10/17 07:44:41] [ warn] [engine] service will stop in 5 seconds
[2020/10/17 07:44:46] [ info] [engine] service stopped

Expected behavior
HTTP server works

Your Environment
"Windows_Server-2019-English-Full-ContainersLatest-2020.04.15" AMI on AWS

@swisspol swisspol changed the title Official Windows build for 1.6.1 does have HTTP server working Official Windows build for 1.6.1 does not support built-in HTTP server Oct 17, 2020
@edsiper
Copy link
Member

edsiper commented Oct 18, 2020

cc: @fujimotos

@swisspol
Copy link
Author

I realized after looking at the docs that the HTTP Server is not enabled by default for Windows when building from source, but I think it should really be enabled in the official builds:

  1. All the docs mention monitoring as something working out of the box, but this requires the HTTP server, so it's not true for Windows
  2. HTTP server is enabled by default in the official Docker images
  3. Building fluent-bit for Windows is non-trivial and having to host and rollout your own executable is quite annoying

PS: Thanks for an awesome product :)

@fujimotos
Copy link
Member

HTTP_Server On has no effect using Windows official build of Fluent Bit 1.6.1

@swisspol We need a bit more work to support HTTP monitoring on Windows.

The big picture here is that HTTP server requires a functional Windows
port of Monkey HTTP server (monkey/monkey), but we're not getting there yet.

Probably we can work on this task after the persistent file chunk
support #2632 (comment), considering that HTTP monitiroing feature is
being requested by several users.

@swisspol
Copy link
Author

Thanks for the info! In the meantime you may want to update the docs to indicate HTTP monitoring is not available on Windows - it nah save people time

@fujimotos
Copy link
Member

In the meantime you may want to update the docs to indicate HTTP monitoring is not available on Windows - it nah save people time

Should be resolved by fluent/fluent-bit-docs#405.

@lacksfish
Copy link

That's hella skuffed. Can we expect a fix for this soonish?

Any other way of having fluentbit report health status to prometheus apart from the nonfunctional API?

@lacksfish
Copy link

Maybe a possible easy remedy would be to have an [Output] option for a File regarding fluentbit health and plugin stats?

https://docs.fluentbit.io/manual/pipeline/outputs/file

It seems fairly doable to write the internal health files into either a JSON or prometheus formatted file. All the code, beside writing to file (overwriting previous content preferred over append), should already exist in the HTTP API code.

If that approach would be interesting, I could dig into the codebase and see if I can help put this functionality together.

@fujimotos
Copy link
Member

That's hella skuffed. Can we expect a fix for this soonish?

@lacksfish The full support will take several weeks at least.

I'm currently working on File Chunk support for Windows #1694;
Probably I can work on it after that.

Maybe a possible easy remedy would be to have an [Output] option for a File regarding fluentbit health and plugin stats?

I think the best way to go is to add a new input plugin in_monitor_agent
that emits health metrics as events. Fluentd provies a similar plugin by default,
so it should make a good sense for Fluent Bit to have one.

@qingling128
Copy link
Collaborator

Hi @fujimotos - Any update regarding this feature request?

@fujimotos
Copy link
Member

@qingling128 I'm currently planning to work on this task in the next v1.8 dev cycle.

@qingling128
Copy link
Collaborator

Thanks for the heads up! We'll plan our work accordingly.

@qingling128
Copy link
Collaborator

I was about to draft a PR to update the doc at https://docs.fluentbit.io/manual/administration/monitoring, but it seems like the master branch has been updated already: fluent/fluent-bit-docs@7bdc708. Any idea why the doc page is not updated?

@fujimotos
Copy link
Member

@qingling128 My understanding is that the master branch points to

https://docs.fluentbit.io/manual/v/master/administration/monitoring

while 1.6 branch points to:

https://docs.fluentbit.io/manual//administration/monitoring

My guess is that the commit was merged but not cherry-picked to v1.6 branch,
so it's not appearing on the current page.

@qingling128
Copy link
Collaborator

Ah I see. That makes sense. Thanks for checking!

@vahric
Copy link

vahric commented Jan 30, 2021

Any change to have this feature on 1.7 version ?

@gillg
Copy link

gillg commented Mar 5, 2021

Still not present in 1.7, it would be very great to have it.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2021

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Apr 5, 2021
@agup006 agup006 removed the Stale label Apr 6, 2021
@edsiper
Copy link
Member

edsiper commented Apr 21, 2021

Fixed by 6efe5c9 , this will be part of Fluent v1.8 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants