I’m interested how y’all check/monitor your reverse proxy logs. I run an nginx vm that has ports 80 and 443 forwarded that exposes some of my services to the internet on different domains. I use nginx exporter for Prometheus, but I would like a better monitoring to see what connects to my services (like my Lemmy instance).

If I would be under pressure by LLM scrapers for example, I would only notice via application and hardware metrics, but I would have to figure out what’s going on.

  • drkt@scribe.disroot.org
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 day ago

    Your proxy doesn’t have its own logs?

    I use Apache for reverse proxying and it’s just standard access logs.
    I built a python script to monitor all my access logs:
    https://u.drkt.eu/GqBdds.png

    • tofu@lemmy.nocturnal.gardenOP
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      1 day ago

      It has logs of course, but I want something like a dashboard and alerts, not having to scroll a textfile

      • doeknius_gloek@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        1 day ago

        I use Promtail + Loki + Grafana to monitor application logs. Promtail scrapes logs, Loki stores and indexes them and Grafana can query Loki with LogQL and also send alerts.

        Apparently Promtail is superseded by Grafana Alloy, which I don’t have experience with.

        Anyway, I set this up mostly for fun and to preserve logs of terminated pods in my kubernetes cluster. I don’t have any alerts in place, but I probably could.

        https://grafana.com/docs/loki/latest/

      • drkt@scribe.disroot.org
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        1 day ago

        Depending on what your log files look like, look at ‘GoAccess’.
        I think you’re gonna be disappointed with existing solutions if you don’t want to sit and stare at text files. It’s big business to automate this kind of stuff, because it’s hard.

        • tofu@lemmy.nocturnal.gardenOP
          link
          fedilink
          English
          arrow-up
          3
          ·
          21 hours ago

          I gave it a quick try and while it’s not exactly what I had in mind, it’s pretty cool! I’ll organize my log formats a bit and check it out more in depth, thanks