tkowalcz / tjahzi

Java clients, log4j2 and logback appenders for Grafana Loki
MIT License
106 stars 18 forks source link

Using https is forced to be in Port 443 #87

Closed prettywoodner closed 2 years ago

prettywoodner commented 2 years ago

As far as i can see there is no other option to enable https on a different port than 443. We are using loki via https on a customized port and can't use 443, so it would be great if there is an option to define custom https ports.

Refering to documentation: https://github.com/tkowalcz/tjahzi/blob/master/log4j2-appender/README.md#port-required

tkowalcz commented 2 years ago

Thanks for reporting. You are right that there is no other way of enabling SSL. I will add configuration option for it and release new version soon.

prettywoodner commented 2 years ago

Ty for the fast response. We are looking forward for the new release!

lukaseckert commented 2 years ago

I like the easy configuration via host+port, but for the more advanced use cases it would be nice to be able to optionally specify the complete Loki url manually. In one of our projects, we have been using the Logback appender for Loki where we just re-used the default environment variables which are already configured for Loki's logcli Tool:

            <http>
                <url>${LOKI_ADDR}/loki/api/v1/push</url>
                <auth>
                    <username>${LOKI_USERNAME}</username>
                    <password>${LOKI_PASSWORD}</password>
                </auth>
            </http>

When we follow Loki's recommendation to combine it with a Reverse Proxy like Nginx to enrich it with HTTPS and Authentication, there is also a possibility to have Loki at a different base path, e.g. https://example.net:8443/monitoring/loki/api/v1/push

3XC1T3D commented 2 years ago

Hi @tkowalcz ,

we are also interested in the oportunity to configure other ports than 443.

Is there an ETA when the next Release will be published?

Best Regards

tkowalcz commented 2 years ago

Hi,

I should be able to release new version by May 3rd.

tkowalcz commented 2 years ago

Hello,

I am working on tests (with nginx reverse proxy) and documentation. Should finish in 1-2days. Sorry for the delay.

tkowalcz commented 2 years ago

I have released version 0.9.21.

Here is new documentation for connection configuration: https://github.com/tkowalcz/tjahzi/releases/tag/tjahzi-parent-0.9.21.

Please let me know what do you think.

tkowalcz commented 2 years ago

Link to docs: https://github.com/tkowalcz/tjahzi/blob/master/log4j2-appender/README.md#configuring-connection-parameters-individually-and-using-url

prettywoodner commented 2 years ago

Hi there, thanks a lot for the release, the notes look promising for us. Are you planning to upload the new version to the global Maven Repository? (https://search.maven.org/search?q=tjahzi)

Thanks a lot! Great Work

tkowalcz commented 2 years ago

Hi,

yes, I had to do some manual steps in oss.sonatype.org and the artifact will appear shortly.

tkowalcz commented 2 years ago

Closing this ticket for now. If you have feedback about this issue please reopen, create new one of start a discussion.