OptimistikSAS / OIBus

OIBus
European Union Public License 1.2
34 stars 17 forks source link

[Loki logs] - When behind firewalls, make it so that loki logs can be sent to another OIBus #1325

Closed burgerni10 closed 2 years ago

burgerni10 commented 3 years ago

And manage some local forwarding data to display on the oibus

kukukk commented 3 years ago

We already have support to forward health signal requests. Instead of adding something specific for loki, would not be better to have a general proxy support, which could be used by other OIBus instances for any purposes? It could receive a JSON body with all the information required to forward the request:

{
    "url": "https://example.com/endpoint",  
    "type": "POST",
    "headers": {it could also contain the authentication},
    "body": any
}
burgerni10 commented 3 years ago

The health signal is now logged so we can monitor through the logs (locally : SQLite, file, console) the health status of OIBus. If loki is enabled, the log will be managed by loki too. It allows the use to trace OIBus activity. We can still send HTTP Health signal beside/instead log Health signal

burgerni10 commented 3 years ago

I think I missed your point. I guess that's the correct approach. I need to think more about it : for logs, proxy must be used only when loki is activated (with a proxy). Maybe by using an ad-hoc winston transport...

burgerni10 commented 2 years ago

Now that we switch to pino logs, I think we can work again on this issue. @kukukk I think your approach is the right one Loki logs are sent in standard HTTP requests, let's see how to reuse the proxy logic in the pino loki transport. Let me know when you start working on that so we can discuss the implementation