Closed selenias closed 4 months ago
Hello @selenias Have you read our README, there are mermaid schemas just below the explanation table of different modes.
I hope you can use it to understand the difference.
But the point is this:
In live
mode, if you're not testing any services protected by our plugin, there's no call to crowdsec.
In stream
mode, the plugin asks Crowdsec for the list of IPs every X seconds, so there's a call to crowdsec.
Thanks to use our plugin !
Hi @maxlerebourg Thanks for getting back. I saw the mermaid workflows. Honestly, i understand the flow. Just not how that represented in the interface.
To be fair, this is the first time i am using a Traefik plugin and i probably have some preconceived expectancy of seeing the plugin added to crowdsec after adding it (even in live
mode).
I had a feeling that, because i was in a testing environment but not having much traffic, had something to do with not seeing the live
mode communicating with Crowdsec.
Just didn't know if this was an issue on my end or misunderstanding things.
In live mode, if you're not testing any services protected by our plugin, there's no call to crowdsec.
That makes more sense than the explanation on the site haha ;)
All in all, thanks for the feedback. I got a better understanding now. keep up the good work (it's quite a product)!
Version (please complete the following information):
Context Not sure where else i can ask this, but i don't really understand the
live
vsstream
mode.Last few days i've been trying to get the plugin working to little avail. That was until i switched to
stream
mode.To summarize, i added the
static config
anddynamic config
to my traefik container (As instructed on the plugin page) I created an API key viacscli bouncer add nameOfBouncer
and added that to the dynamic configuration. Restarted both containers and tried to verify if the bouncer was being registered.This is were things got confusing. Mainly because i didn't know how to verify if it was working or not. (To add: I also have the
firewall-bouncer
running on my Host (which works)).When i check my bouncers
cscli bouncers list
, i get the following listThis makes me think the treafik-bouncer is not communicating with Crowdsec (since it wasn't getting an IP address or Type). And no matter how long i wait, the latter bouncer won't change.
When checking the metrics
cscli metrics
i only get this bouncer resultI've enabled
DEBUG
on both Traefik and the plugin, but i don't see anything strange. To be fair, i don't have much traffic happening (as its a TEST environment right now). From a clean install, i at least am not getting any errors nor warnings. Crowdsec logs only show these 2 entries in intervalsThis tells me that at least the
firewall-bouncer
is communicating.and traefik is loading the plugin
At some point, i figured i would dumb down on the options and try to use the bare minimum of
dynamic configurations
for the plugin. It was when i switch toStream
that i suddenly saw a change.This was the result
cscli bouncers list
cscli metrics
also listed the bouncer nowTo be honest, i've been reading the description of
live
andstream
dozens of times now, but i can't really put it in works to explain the difference for myself. Especially relating to my issue above. It's like thecache
is somehow preventing the API to connect?am i doing something wrong? Or am i simple misunderstanding things? Why does using
Live
not connect the plugin with Crowdsec? (both containers can ping one another).