lancachenet / monolithic

A monolithic lancache service capable of caching all CDNs in a single instance
https://hub.docker.com/r/lancachenet/monolithic
Other
737 stars 73 forks source link

watchlog.sh in monolithic? #10

Closed malteserr closed 5 years ago

malteserr commented 5 years ago

Describe the issue you are having

Hi guys,

I must admit I'm new to linux, docker as well as steamcache but I successfully managed to deploy a server based on monolithic for a small LAN party (10 friends) over the last weekend, and it worked well enough aside from the slow initial speeds others have reported.

I've been wondering if there is a better way to visualise cache hits vs misses, as opposed to trying to follow the tail output of access.log. I noticed that the steamcache container has a script that colours hits/misses called watchlog.sh. My attempts at modifying this for monolithic's access.log didn't work too well at all.

It's probably pretty far down the list of issues and features you're planning on at the moment, but is there anything you can suggest or a similar script for this container?

Thanks!

VibroAxe commented 5 years ago

Hey @malteserr

For a simple command line script I recommend throwing the output of your tail through ccze, this will nicely colour your output according to errors/hits/misses etc.

tail -f /data/logs/access.log | ccze -A

will give you something which looks like this

image

For something a bit more indepth I would suggest having a look at an ELK stack, a good starting point is https://github.com/zeropingheroes/lancache-elk, however if you wait a couple of weeks we are looking to release our own heavily modified version of this which will be fully compatible with mono. This will then give you fully queryable dashboards which look something like this:

image

I'll leave this open and ping you when the new repo goes live ;)

malteserr commented 5 years ago

Thank you @VibroAxe, you rock. This goes to all the steamcache team too!

nightah commented 5 years ago

@VibroAxe what are the chances of releasing a Grafana Dashboard for mono as opposed to ELK? If there's not much appetite from the team I might look at trying to convert your stack into a Grafana dashboard.

VibroAxe commented 5 years ago

hey @malteserr

See https://github.com/steamcache/logstash for more info!

VibroAxe commented 5 years ago

@nightah Currently we only really use kibana as the data is already in elastic, so kibana seems the logical output. If you made a dashboard for grafana I wouldn't be against hosting it somewhere on steamcache (possibly slightly repurposing the above logstash repo into a more generic dashboards repo)