How to Monitor Nginx with Prometheus and Grafana? (Step-by-Step - Install - Monitor - Fluentd)

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ม.ค. 2025

ความคิดเห็น • 82

  • @AntonPutra
    @AntonPutra  ปีที่แล้ว +2

    🔴 - To support my channel, I’d like to offer Mentorship/On-the-Job Support/Consulting - me@antonputra.com

  • @pjj7466
    @pjj7466 11 หลายเดือนก่อน +1

    Excellent tutorial and I have implemented as it is and worked like charm. Keep going bro.

    • @AntonPutra
      @AntonPutra  11 หลายเดือนก่อน

      ❤️

  • @adibgasah3557
    @adibgasah3557 3 หลายเดือนก่อน

    Thanks. Your posts videos are very useful when trying other monitoring tools and approaches!

  • @bharatchopra7212
    @bharatchopra7212 2 ปีที่แล้ว +3

    Another great video. Thanks Anton

  • @chasim1982
    @chasim1982 2 ปีที่แล้ว +4

    Thanks Great Video as always, lot of learning

    • @AntonPutra
      @AntonPutra  2 ปีที่แล้ว +1

      Thanks Muhammad!

  •  2 หลายเดือนก่อน

    Today is my first day at close-to-devops job and this video is helpfull.

  • @entretenimento_constante
    @entretenimento_constante 2 ปีที่แล้ว +4

    It's a very good video, very clean and organized.

    • @AntonPutra
      @AntonPutra  2 ปีที่แล้ว +1

      Thanks Ferdinando!

  • @alexr6631
    @alexr6631 2 ปีที่แล้ว +1

    Thanks. Your posts videos are very useful when trying other monitoring tools and approaches!

    • @AntonPutra
      @AntonPutra  2 ปีที่แล้ว

      Glad it was helpful!

  • @TheArpitkoberoi
    @TheArpitkoberoi ปีที่แล้ว +1

    fluentd is resource hungry.
    The CPU usage slowly kept rising over 8-9 hours and suddenly spiked the memory from 1G to 8G crashing the nginx server itself causing downtime in production.
    This happened when the nginx server was handling just 5-6RPS.

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว +1

      Agree, try lua plugin - github.com/knyar/nginx-lua-prometheus

    • @TheArpitkoberoi
      @TheArpitkoberoi ปีที่แล้ว

      Let me check it out, thanks

  • @nailsv5924
    @nailsv5924 ปีที่แล้ว +1

    Thank a lot, for this guide!

  • @yashwantpatil9230
    @yashwantpatil9230 6 หลายเดือนก่อน +1

    Thanks Anton

    • @AntonPutra
      @AntonPutra  6 หลายเดือนก่อน

      welcome!

  • @congdatt
    @congdatt 10 หลายเดือนก่อน +1

    Keep it up bro !!!

    • @AntonPutra
      @AntonPutra  10 หลายเดือนก่อน

      Thanks! Will do

  • @nforlife
    @nforlife ปีที่แล้ว +1

    Great video @anton
    Can you make a video on how to set up this solution on EKS?

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว +1

      Is there anything specific? Cause I have bunch of them on my channel if you search for Prometheus or Eks

    • @nforlife
      @nforlife ปีที่แล้ว

      I just figured out you have almost everything. Do you have a human brain or a chip 🤔
      I was also wondering if you offer training in python programming for DevOps engineers

  • @spuddyminer8347
    @spuddyminer8347 2 หลายเดือนก่อน

    do you have any videos with explainer on why you use a different user for each process?

    • @cbabbx
      @cbabbx 2 หลายเดือนก่อน

      In general you want to use a different user for each process for security reasons.

    • @spuddyminer8347
      @spuddyminer8347 2 หลายเดือนก่อน

      assuming that it's because the program won't have permissions to make changes to my files that have permissions set so that other users can't open them...but they can still read my files. I guess there's probably some nuance here I'm missing that makes it worth it.

  • @vtvvnha2230
    @vtvvnha2230 2 ปีที่แล้ว +1

    awesome

  • @AdharshSreedharan
    @AdharshSreedharan ปีที่แล้ว +1

    Great video thanks a lot

  • @gabrielarispe7703
    @gabrielarispe7703 ปีที่แล้ว

    hi your dashboard no this in the github repository

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      perhaps forgot to commit, but it's simple enough to recreate

  • @mechrono9555
    @mechrono9555 2 ปีที่แล้ว +2

    using docker-compose would have been a massive time and complexity saver in this project.

    • @AntonPutra
      @AntonPutra  2 ปีที่แล้ว

      sure, i have an example in the following video - github.com/antonputra/tutorials/blob/main/lessons/141/docker-compose.yaml

    • @samtx
      @samtx ปีที่แล้ว

      ​@@AntonPutrahow to run docker compose on two nodes

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      @@samtx you can use minikube and spin up multiple nodes

    • @samtx
      @samtx ปีที่แล้ว

      @@AntonPutra thx I was asking if docker swarm is need if to run dockercompose on multiple servers for hardware issues

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      ​@@samtx You could use Docker Swarm, but it has been outdated for a while. If you need container orchestration (running containers on multiple servers), consider using k8s (Kubernetes).

  • @fazlurrahmatullah3017
    @fazlurrahmatullah3017 8 หลายเดือนก่อน +1

    Hello, can u give a dashboard example for "latency traffic" like in this video??
    *Sorry for my bad english

    • @AntonPutra
      @AntonPutra  8 หลายเดือนก่อน

      sure, here is source - github.com/antonputra/tutorials/tree/main/lessons/140/dashboards
      just import it

  • @nahuszna
    @nahuszna ปีที่แล้ว +1

    I find it hard to understand your pwd as it's not shown in the terminal :(
    Otherwise awesome material thanks Anton!

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      Thanks for the feedback, I'll include them in the readme starting next video.

  • @antgod76
    @antgod76 2 ปีที่แล้ว

    Hi. Can you explain how can we setup the terraform locally without the AWS please?
    Thak you.

    • @AntonPutra
      @AntonPutra  2 ปีที่แล้ว

      You can use "docker-compose up" instead. Terraform is to create AWS VPC and EKS,

  • @eugenechernyshenko4933
    @eugenechernyshenko4933 2 ปีที่แล้ว +1

    Возможна высокая кардинальность метрик по path

    • @AntonPutra
      @AntonPutra  2 ปีที่แล้ว

      Soglasen, but it's a good starting point

  • @rohithmn3378
    @rohithmn3378 ปีที่แล้ว

    Hi @Anton Putra,
    Could you please make a similar video on k8s cluster to monitor Nginx with Prometheus and Grafana using fluentd.! It would be of great help.

  • @fazlurrahmatullah3017
    @fazlurrahmatullah3017 ปีที่แล้ว

    how to install set-alert? is the method the same as the Prometheus set-alert in general?

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      do you mean alertmanager? yes it's a binary, you can use systemd to manage it as well

    • @fazlurrahmatullah3017
      @fazlurrahmatullah3017 ปีที่แล้ว

      @@AntonPutra yes, that's what i mean
      thanks you

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      @@fazlurrahmatullah3017 you can scroll down antonputra.com/monitoring/install-prometheus-and-grafana-on-ubuntu/

  • @samuelude6858
    @samuelude6858 11 หลายเดือนก่อน

    @Anton Putra Nice video content. Followed through but noticed at the end that the imported fluentd dashboard failed with the error `Templating Failed to upgrade legacy queries` and was not able to display anything. Any idea what could be the problem as other dashboard i imported via ID worked fine or is there a way to convert from JSON to ID?

    • @AntonPutra
      @AntonPutra  11 หลายเดือนก่อน

      try to update datasource or just create a new dashboard and import quiries

    • @samuelude6858
      @samuelude6858 11 หลายเดือนก่อน

      @@AntonPutra thanks got it fixed already🙏

    • @pateldivya6422
      @pateldivya6422 9 หลายเดือนก่อน

      @@samuelude6858 Heyy! can you please say how you solve this? i got same error

  • @domingosdias5988
    @domingosdias5988 10 หลายเดือนก่อน +1

    Great!!!

  • @SanjeevKumar-nq8td
    @SanjeevKumar-nq8td 2 ปีที่แล้ว

    Which capability Fluntbit does not have? Can you bit more clear on it please.
    Fluentbit which run as daemon set, hence should be able to read parse the log stream of Nginx?

    • @AntonPutra
      @AntonPutra  2 ปีที่แล้ว +1

      I know, I just couldn't find the 3rd party plugin that i can use to parse logs and expose them as prometheus metrics. If you know one, please let me know.

  • @eugenegranovsky9439
    @eugenegranovsky9439 ปีที่แล้ว

    and what about monitoring nginx unit with prometheus and grafana?

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      Unit? I haven't used NGINX Unit directly, mostly ingress.

  • @MeroCasulli
    @MeroCasulli 2 ปีที่แล้ว

    Amazing video, thank you!
    I have the following error while importing the 2nd group of panels:
    "Failed to upgrade legacy queries Datasource r_9gjRp4z was not found"
    how can i fix it? thanks

    • @AntonPutra
      @AntonPutra  2 ปีที่แล้ว

      yes, can you try to update data source under settings (variables)

    • @samuelude6858
      @samuelude6858 11 หลายเดือนก่อน

      ​@@AntonPutra​What exactly to update, seems it's the same issue with mine.

  • @andriimulyk575
    @andriimulyk575 2 ปีที่แล้ว

    Great video, can you make a video how to do something similar with nginx-ingress in K8s? I think it will be very useful

    • @AntonPutra
      @AntonPutra  2 ปีที่แล้ว +1

      Well, i have bunch of videos to monit nginx ingress including this one - th-cam.com/video/VjFFzGFyVlY/w-d-xo.html

  • @dAvid3_f
    @dAvid3_f ปีที่แล้ว +1

    Very nice tutorial, thanks 👍
    Side note: I'm just wondering why you don't use Ansible or any other CM (config management) tool to install and configure all the dependencies ?!?

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว +1

      Thanks, I do, maybe for other videos - github.com/antonputra/tutorials/tree/main/lessons/151/ansible

  • @VRT-y3f
    @VRT-y3f 2 ปีที่แล้ว

    Здравствуй, а как настроить для всего nginx-са , а не только для твоего тестового flask приложения?

    • @AntonPutra
      @AntonPutra  2 ปีที่แล้ว

      Well, it's not only for the flask. You can use the path as a variable to switch between different upstream servers.

    • @VRT-y3f
      @VRT-y3f 2 ปีที่แล้ว

      @@AntonPutra , а какую именно переменную ты имеешь в виду? value в json-е на гитхабе со значением /api/devices?
      Помоги пожалуйста, уже долго пытаюсь настроить мониторинг 4xx и 5xx ответов nginx-а в grafana, но пока без успешно.

  • @AntonPutra
    @AntonPutra  2 ปีที่แล้ว +2

    ❤Part 2 - How to Build Custom Prometheus Exporter? - th-cam.com/video/3wT0zSsQb58/w-d-xo.html
    I misspoke; this particular nginx prometheus exporter must be installed on the same VM compared to the kafka exporter, where you can specify multiple brokers.

  • @ziaurrehman4738
    @ziaurrehman4738 2 ปีที่แล้ว +4

    So fast as usual, hard to follow

    • @andrewm4894
      @andrewm4894 2 ปีที่แล้ว +1

      I kinda like the speed, gets straight to it

    • @andrewm4894
      @andrewm4894 2 ปีที่แล้ว

      Maybe try playback speed of 0.75 I tried it and seems like could help if you find it too fast

    • @AntonPutra
      @AntonPutra  2 ปีที่แล้ว +1

      You can follow the blogpost - antonputra.com/monitoring/monitor-nginx-with-prometheus/#intro

  • @mikoo1991
    @mikoo1991 2 หลายเดือนก่อน

    Templating
    Failed to upgrade legacy queries
    this is what i get in grafana. 2024 october. maybe ur version of grafana is younger than mine