How to Install Prometheus and Grafana on Ubuntu? (Node Exporter & Alertmanager & Pushgateway)

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024

Комментарии • 70

  • @AntonPutra
    @AntonPutra  Год назад +1

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

  • @AntonPutra
    @AntonPutra  Год назад +2

    👉 How to Manage Secrets in Terraform - ruclips.net/video/3N0tGKwvBdA/видео.html
    👉 Terraform Tips & Tricks - ruclips.net/video/7S94oUTy2z4/видео.html
    👉 ArgoCD Tutorial - ruclips.net/video/zGndgdGa1Tc/видео.html

  • @fedora2050
    @fedora2050 2 года назад +3

    man you need to get a noble prize, you are the best. Good luck

  • @itx777
    @itx777 9 месяцев назад +1

    I'm so glad that I found your channel, nice job Anton! Greetings from Hungary!

  • @helveticastandard9264
    @helveticastandard9264 Год назад +2

    Easy to understand. Really like this video

    • @AntonPutra
      @AntonPutra  Год назад

      Cool, thanks for the feedback!

  • @unesyu3481
    @unesyu3481 Год назад +1

    Thanks bro, you are the only who explained this clearly like this !

  • @AZ1981
    @AZ1981 Год назад +2

    Excellent video, it was my lifesaver, suscribed!

  • @jairunet
    @jairunet 2 года назад +2

    Excellent Anton, great details and to the point, I appreciate the content and the step by step example, I have a few concerns regarding the clear text passwords for a production deployment 🤔but other than that for an individual, wanting to monitor and get alerts from the local home network is good enough in my opinion, subscribed and joining your discord channel as well, looking forward to chatting there. Thanks again!

    • @AntonPutra
      @AntonPutra  2 года назад +1

      Thanks Jair for feedback!

  • @monitorcamera8850
    @monitorcamera8850 2 года назад +1

    thank you, wait for the prometheus series videos

  • @mamun001
    @mamun001 2 месяца назад +1

    Wow. Thank you!

  • @ibragim_sub
    @ibragim_sub Год назад +3

    This tutorial is excellent!
    Can you help me please
    I installed Prometheus all step by step from this tutorial, but it's not working in web browser. i have tried local IP and other one but its now opening in web.
    Prometheus is active and running, no errors. Used journalctl -u prometheus -f --no-pager command and there is no problems.
    thanks)

    • @AntonPutra
      @AntonPutra  Год назад +1

      Thanks for the feedback. Well, first make sure that it's actually running "ps -ef | grep prometheus".
      Second, you need to access :9090 not 80, and also make sure that the firewall is open "nc -vz 9090"

  • @evgenyfeigelman9280
    @evgenyfeigelman9280 2 года назад +1

    This tutorial is excellent. A lot of things has finally explained in the best possible way .However , at times it feels a little fast . For example Pushgateway still not so clear . Can you elaborate a bit more on that, please ?

    • @AntonPutra
      @AntonPutra  2 года назад +1

      Thanks. Pushgateway is a standalone service that is used when you need to collect metrics from short lived jobs that cannot be scraped, For example cron jobs or Jenkins job. You can also use it with some scheduling tools such as airflow. You job pushes metrics to pushgateay and prometheus scrapes not your job but the Pushgateway service.

  • @IssamAdvans
    @IssamAdvans 6 месяцев назад

    thank you so much Can you please do antoher video to push alerts to outlook and if its possible to check URLs with blackbox ?

  • @sigatwork2512
    @sigatwork2512 7 месяцев назад +1

    Terimakasih. Video yang bagus

  • @IndianSumaira
    @IndianSumaira 2 месяца назад

    Anton putra, thank you this was very useful video. Would you please let me know how to clean this after use. I want to delete everything that we installed in this video and free the ports. Early response is appreciated

  • @estebanzamora7667
    @estebanzamora7667 4 месяца назад

    Hi, im getting a n error when I use enable prmetheus,, error:
    Failed to enable unit: Unit file prometheus.service does not exist.

  • @jrose1970
    @jrose1970 2 года назад +1

    Great video! I was wondering does the same basic auth method work for net_exporter, push gateway, alerts manager and grafana?

    • @AntonPutra
      @AntonPutra  2 года назад +1

      You can use some reverse proxy such as nginx to enable basic auth on push gateway or alerts ,anager. Grafana has it's own auth setup.

  • @Kk-rl7nv
    @Kk-rl7nv 4 месяца назад

    Thanks useful video 😊
    Please suggest we used here installation and configuration in 1 machine, but in production how other machines monitoring will be possible, username password machenisum, should we have to use in production

    • @AntonPutra
      @AntonPutra  4 месяца назад

      Less VMs you have it's easier to manage. You can start hosting prom & grafana on the same host, anyway if you want to scale you need thanos/cortex or grafana mimir

  • @elmor2881
    @elmor2881 2 года назад

    hello when you created a new datasource file, the extension isn't .yaml but .yml (at 6:35)

    • @AntonPutra
      @AntonPutra  2 года назад

      you can create it as a file - grafana.com/docs/grafana/latest/administration/provisioning/

  • @iamshivaagrawal
    @iamshivaagrawal 5 месяцев назад

    So I have 3 linux servers. I've set up things on one server. How can I get the metrics data from all the servers so that I can monitor it from grafana dashboard?

    • @AntonPutra
      @AntonPutra  5 месяцев назад

      You need to register those three servers with Prometheus as targets. You can use static IP addresses, domain names, or more dynamic service discovery mechanisms, such as Kubernetes or cloud provider-specific options based on tags.

  • @Jamvlogging
    @Jamvlogging Год назад

    Can I Install prometues in virtual box ubantu on pc or does it need to be a server?

    • @AntonPutra
      @AntonPutra  Год назад

      Yes you can. You can even directly run it on your laptop by downloading binary for your platform (windows/linux/mac etc) - prometheus.io/download/

  • @Jpes211
    @Jpes211 2 месяца назад

    hey i'm having trouble with the basic auth, when i'm trying to log in on grafana it keeps refreshing on the log in page and keeps telling me to put the user and password again

    • @AntonPutra
      @AntonPutra  2 месяца назад

      you can use basic auth in 2 ways
      - recently added native basic auth on prom (prometheus.io/docs/guides/basic-auth/)
      - use reverse proxy and setup nginx basic auth
      both are valid approaches with pros and cons

  • @gg-gn3re
    @gg-gn3re 2 года назад +1

    ew why are they using bcrypt and not argon2id in 2018+4?

  • @IndianSumaira
    @IndianSumaira 2 месяца назад

    Hey 4:11, its not working here.
    Failed to start node exporter
    Node_expoter.service: Start request repeated too quickly.
    Node_expoter.service: failed with result 'exit-code'

    • @IndianSumaira
      @IndianSumaira 2 месяца назад

      Please help

    • @AntonPutra
      @AntonPutra  2 месяца назад +1

      1. you have 2 issues. First you need to find the problem why exporter won't start for that you can use something like journactl -u node_exporter.server -f
      2. you need to restart your systemctl daemon "Start request repeated too quickly."

    • @IndianSumaira
      @IndianSumaira 2 месяца назад

      @@AntonPutra thanks, it helped 😇

  • @konstantinmalevski6794
    @konstantinmalevski6794 Год назад

    yeah at 2:37 whenever i add the default port to the yml file, i save it and then when i check if its valid it says did not find expected key? Can someone help?

  • @mlkh115
    @mlkh115 Месяц назад

    Why should we create a user for Prometheus?

    • @AntonPutra
      @AntonPutra  Месяц назад

      It is just a best practice to limit what that service can do on your server. If you use the root or another privileged user, and Prometheus gets compromised, the attacker will have access to everything on that instance.

    • @mlkh115
      @mlkh115 Месяц назад

      @@AntonPutra Thanks for reply🙏🏻❤️

  • @unesyu3481
    @unesyu3481 Год назад

    Can you add postgres_exporter also ?

    • @AntonPutra
      @AntonPutra  Год назад +1

      It's a go binary, installation is similar to the node exporter on vm. github.com/prometheus-community/postgres_exporter
      Do you have any issues with it?

    • @unesyu3481
      @unesyu3481 Год назад

      @@AntonPutra the postgres is installed on a docker and i cant get it to connect via 5432 port, I managed to get the postgres-exporter end point up but its not showing any tables :/

  • @fazlurrahmatullah3017
    @fazlurrahmatullah3017 Год назад

    13:12
    what if i make system user "alertmanager" to "useralert1"
    do some config need to be changed?
    Sorry, I'm very new to Linux

    • @AntonPutra
      @AntonPutra  Год назад +1

      yes, you also need to update this linux user in systemd config

    • @fazlurrahmatullah3017
      @fazlurrahmatullah3017 Год назад

      @@AntonPutra changes like
      user
      group
      and ExecStart=/usr/local/bin/alertmanager \
      do the above need to be changed? or is there something else if for example my user "alertmanager" changes to "useralert1"?

    • @AntonPutra
      @AntonPutra  Год назад

      @@fazlurrahmatullah3017 just user and group. "/usr/local/bin/alertmanager" is just a binary, you keep it

  • @sanjaytiwari1805
    @sanjaytiwari1805 Год назад

    Can you add your PSP too ?

  • @fazlurrahmatullah3017
    @fazlurrahmatullah3017 Год назад

    parse "": empty url
    I've followed all the tutorials parse "": empty url

    • @AntonPutra
      @AntonPutra  Год назад

      hard to suggest anything based on this

    • @fazlurrahmatullah3017
      @fazlurrahmatullah3017 Год назад

      @@AntonPutra you can, sir, it turns out that I had previously added the datasource
      so i deleted the previous datasource, and it worked

  • @emxtion9715
    @emxtion9715 2 года назад

    А видео на русском языке планируются?

    • @AntonPutra
      @AntonPutra  2 года назад

      V budushem da, poka slojno sovmeshat full time job i youtube

  • @talhabinrizwan1654
    @talhabinrizwan1654 2 года назад +1

    Awesome.
    You said in production we should use datasource config file for Grafana, so that it can be committed to the git. But for the "basicAuthPassword" setting you also use the password there (without hash). Is there any way to prevent it?

    • @AntonPutra
      @AntonPutra  2 года назад +1

      of course, I didn't mean commit passwords to git :) you can use environment variables for example for passwords to avoid committing hashes

  • @237311
    @237311 2 года назад

    I got an error message when I executed this command > root@grafana# prometheus --version
    -bash: /usr/local/bin/prometheus: cannot execute binary file: Exec format error
    root@grafana:~$ sudo journalctl -ex
    Apr 23 06:23:45 splunk systemd[48322]: prometheus.service: Failed to execute command: Exec format error
    Apr 23 06:23:45 splunk systemd[48322]: prometheus.service: Failed at step EXEC spawning /usr/local/bin/prometheus: Exec format error

    • @AntonPutra
      @AntonPutra  2 года назад

      Most likely you downloaded the wrong binary. Are you using Ubuntu as a base OS?

  • @alexbrofman5935
    @alexbrofman5935 Год назад

    I use prometheus version 2.44 and I try run this command
    ./prometheus-2.36.0.linux-amd64/promtool check config web.yml
    I recieved this
    "./prometheus-2.44.0.linux-amd64/promtool check config ./web.yml
    Checking ./web.yml
    FAILED: parsing YAML file ./web.yml: yaml: unmarshal errors:
    line 2: field basic_auth_users not found in type config.plain
    "
    Can you help me with them ?

    • @AntonPutra
      @AntonPutra  Год назад

      there is not field like that, check this - github.com/prometheus/prometheus/blob/release-2.23/config/testdata/conf.good.yml#L85-L87