Install Grafana with Prometheus

Edward Viaene
A free video tutorial from Edward Viaene
DevOps, Cloud, Big Data Specialist
4.4 instructor rating • 12 courses • 228,187 students

Learn more from the full course

Monitoring and Alerting with Prometheus

Become a DevOps monitoring expert using Prometheus and Grafana, monitor your infrastructure and applications as a pro.

04:03:51 of on-demand video • Updated January 2021

  • Install, Configure and run Prometheus
  • Setup Alerting in Prometheus
  • Visualizing data in Grafana
  • Implementing Prometheus within your own applications
  • Enable metrics & alerting on throughout your infrastructure
  • Implement instrumentation
English Instructor: As you have seen in the previous demo, the Prometheus dashboard is pretty basic. So most people install Grafana to get a nicer dashboards, nicer visualizations. So now I will show you how to install Grafana. So in the Prometheus course, in the scripts folder, we will execute the node exporter later, I have another lecture on that, let's first install Grafana. so now Grafana should be running. It is running. Grafana runs by default on port 3,000. Here we can then login using admin as login and admin as a password. We're going to start by adding a data source. We can go to Configuration, Data Sources. There are no data source defined yet. I'm gonna add one, we'll call it prometheus. Type is Prometheus URL localhost9090. Access is default. You don't need authentication, there's no SSL configures, we're going to scrape every 15 seconds and the HTTP method is GET. Save and test, data source is working. And then we should be able to create a dashboard. Let's try a graph. Then we going to edit this graph and data source is prometheus and here we can add a query. We can just copy paste this scraped sample scripts and that is here. And then we can get exactly the same graph here. So here, we see the same graph that we have in Prometheus. So here you see now, if I refresh this it is the same, but then in Grafana and here in Grafana, you can add users, you can invite your colleagues, you can connect it with LDAP, you can connect with GitHub, and so on. It's a much nicer tool that you can use for visualizations, and you can create dashboards. As a front end, Grafana is much better than using the Prometheus dashboard yourself. I always recommend you to use this one for your visualizations. So these installed Grafana. If you wanna know what exactly isn't a script, we can have a look. So the scripts, the script for Grafana, is pretty basic. We just edit the package we did an apt-get update, apt-get install grafana daemon-reload, start grafana and enable grafana. So this is the only thing that you need to do on an Ubuntu. If you're using another operating system, then Grafana has packages available for your other operating system. You can just check on the Grafana website how you have to install it for your operating system, but it's a very similar as this one.