Transcript for:
Introduction to Grafana and Its Architecture

hey what's up everybody my name is moss norman and in today's video we're going to talk about grafana grafana is an open source web application for visualizing data grafana allows you to build charts graphs and dashboards of data that you want to visualize and to understand how grifana works let's take a look at the typical architecture of grafana infrastructure this is a simple example of how the infrastructure for grafana might be configured it could be a lot more complex than that but for the purposes of explaining grafana this is sufficient so the first item in this diagram is the data producer and the data producer actually produces the data that you want to visualize so it could be something like a jenkins ci server it could be a raspberry pi it could be a virtual machine in a data center uh or it could be kubernetes pods or it could even be something like sensors uh like sensors uh around your your house like iot sensors any kind of like weather instrumentation that has sensors on them so you want to track like weather data as well that is what the data producer is in this diagram and the data source in this diagram is a database such as prometheus or influxdb or another database like mysql for instance and that database is connected to the data producer and depending on the type of database it will either pull data from the data producer maybe it's sensor data so it's pulling like temperature data or weather data or the data producer is configured to push data to the database so it depends really on the on the data source the type of data source in the case of prometheus for instance prometheus actually reaches out to the data producer and there is a dedicated endpoint for prometheus to pull data from so the data producer will aggregate data and provide it on a particular like http endpoint url endpoint that prometheus then scrapes for uh for data and collects and stores in its database so depending on the database the data source may pull data from the data producer or the data producer may push data to the data source now the grafana server is the front end that actually visualizes the data and in order to get the data grafana queries the data source and the data source returns the requested data based on the query and that data is then displayed on a grafana dashboard as you can see here there's really two main categories of data that's that's visualized in grafana the first category is metrics and the second category is logs an example of a metric might be cpu load or current memory usage or the temperature of the outside temperature or even the temperature of like the cpu or the video card something like that in contrast logs would look something more like this where you have a time stamp logging level whether it's error info warning or debug and then more detailed information and if we look at an example grafana dashboard this is what grafana dashboards look like you can uh they're interactive dashboards of the data from the data source and they include things like i mentioned before it includes memory cpu the requests over time so it's a time series uh time series database here where we see the the data over time and it's a very interactive dashboard if i wanted to zoom in on a particular time frame i could just click and drag and it will zoom in on into that time frame and it updates all of the dashboard accordingly this dashboard is an example of metrics data but if we wanted to look at logs we can take a look at a sample logs panel and then you can see similar to what i showed you in the in the previous diagram some sample logs some sample logs and log entries and a graph of a histogram showing the uh the logging levels so air level logs warning level and info level grafana has a lot of features and i'm only showing a handful of them here but this video is to just give you a short overview on what graffana is and how it works and if you'd like to see more videos i'll be producing uh some additional grafana videos in the near future if you like this video please consider throwing a like on it and subscribing to the channel for more grifana related videos and if you have any questions comments or feedback please leave them in the comments below thanks for watching