Giter VIP home page Giter VIP logo

profana's Introduction

Ruby on Rails with prometheus/grafana/loki for monitoring

This is a template to create a rails project with prom and grafana monitiring from start.

  • This project requires docker.

Contents

  • Minimal Rails app
  • Prometheus
  • Grafana
  • Loki
  • Promtail
  • Caddy
  • Redis
  • Postgres

Running

  • check the .env and compose files to change secrets
  • change compose files latest versions to avoid breaking changes whant using it as a template
  • run docker compose -f docker-compose.yaml -f docker-compose.dev.yaml up -d --build
  • access grafana panel
  • add loki and prometheus as connections
  • access rails app to generate logs
  • add grafana dash with loki metrics

profana's People

Contributors

rovel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

profana's Issues

promtail logs are not being updated because Docker containers don't update mounted files

I am using your repo as inspiration to configure promtail using Docker in my project. Appologice if this issue is not happening on your setup.

when I start the promtail image with:

docker-compose up promtail

I see the logs are being detected:

promtail_1  | level=info ts=2024-05-14T19:39:32.980862331Z caller=tailer.go:147 component=tailer msg="tail routine: started" path=/var/log/rails/development.log

And they are digested by Loki and presented in Grafana.

But new logs are not being detected.

If I bash into the promtail image I see the /var/log/rails/*.log files are frozen and they are not being updated with my locals /railsapp/logs/*.log.

This looks to be a limitation with Docker containers: https://stackoverflow.com/questions/52897000/docker-files-from-volume-not-updated-in-target

Did you manage to make this work?

Thanks for your support and your work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.