+4 votes
245 views
How to install Grafana on Ubuntu 18

in Linux / Unix by (552k points)
reopened | 245 views

1 Answer

+5 votes
Best answer

1. How to install Grafana on Ubuntu 18.04
2. How to access Grafana in Ubuntu 18.04

There are several utilities that have been developed to help us maintain central control over services, values, applications and other elements that are installed in our Linux operating systems and this is useful for administration, auditing, support and general management tasks as it generates data in real time and with the correct values. One of these applications is Grafana which was designed with the best performance of metrics in mind and therefore TechnoWikis will explain in detail how to install and use Grafana in Ubuntu 18.04 ..

What is Grafana
Grafana is a free and open source tool focused on monitoring and visualization of data at the enterprise level with support for Graphite, InfluxDB, Prometheus, Elasticsearch and many more databases available in the market.

With Grafana it will be possible to consult, visualize, alert and understand the metrics regardless of where they are stored which gives us a higher degree of administration.

Features
Among its characteristics we find:
  • Multiple display options as we will have access to multiple types of graphics, panel add-ons and many more options to display metrics and records.
  • It has an alert system where each metric will be under an evaluation process for a defined period of time and, if any difference is found, an alert will be generated from this situation.
  • Extensive notification options, these are given when an alert modifies its status and it will be possible to receive notifications by email or through platforms such as Slack, PagerDuty, VictorOps, OpsGenie or webhook.
  • It has dynamic dashboards with which we can create dynamic and reusable dashboards using various template variables in which drop-down menus and more actions can be added.
  • Mixed data sources which allow to mix different types of data in a single graph to have a better concept of information.
  • We have annotations which can be added to the graphics with events through different data sources, thus, when hovering over the events, the metadata and event tags will be displayed in a much more detailed way.
  • Ad-hoc filters that allow you to create new filters by key or value without having to turn off the system, and these filters will be automatically applied to all queries from that data source.
  • It has a dark theme in case we want to create a new visualization impact.

1. How to install Grafana on Ubuntu 18.04


To install Grafana on Ubuntu 18 we have two alternatives.
Option 1
The first option is to add the Grafana repository to the system, for this, we will use the following command:
 sudo nano /etc/apt/sources.list 
There we enter the following:
 deb https://packagecloud.io/grafana/stable/debian/ stretch main 
image

We save the changes using the Ctrl + O keys and exit the editor using Ctrl + X. Then we will add the GOG key using the following line:

 sudo curl https://packagecloud.io/gpg.key | sudo apt-key add - 
image

Subsequently, we update the repository packages:

 sudo apt-get update -y 
We install Grafana by running:
 sudo apt-get install grafana -y 
Option 2
The second option to use is to download the latest version of the official site with the following command:
 wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.2.2_amd64.deb 
image

Then, unzip and install the downloaded file by running:

 sudo dpkg -i grafana_5.2.2_amd64.deb 
image

With Grafana installed on Ubuntu 18.04, we proceed to start the service and enable it for startup at startup by running the following lines:

 sudo systemctl daemon-reload sudo systemctl enable grafana-server sudo systemctl start grafana-server 
image

We proceed to check the status of Grafana by executing the following line. We can verify that the state is active.

 sudo systemctl status grafana-server 
image

2. How to access Grafana in Ubuntu 18.04

Step 1

To access Grafana, we will go to a browser and there we enter the following syntax:
 http: // IP_address: 3000 
There we enter the following credentials:
  • User: admin
  • Password: admin

image

Step 2

Click on the Log in button and it will be necessary to change the access password:

image

Step 3

When accessing Grafana this will be your environment: image
Step 4

From there it will be possible to access the various options to add new boards, apps, etc: image
Step 5

It will also be possible to create our own graphics: image
Step 6

Based on the desired style we can add the data source:

image

Step 7

We have a special section to add the data source: image
Step 8

From there we assign the desired name and the values ​​to be configured: image

Thus, Grafana is an integral solution to manage metrics in Linux..


by (3.5m points)
edited

Related questions

+5 votes
1 answer
+3 votes
1 answer
+5 votes
1 answer
asked Oct 15, 2019 in Linux / Unix by backtothefuture (552k points) | 230 views
+5 votes
1 answer
asked Oct 15, 2019 in Linux / Unix by backtothefuture (552k points) | 289 views
+5 votes
1 answer
asked Oct 15, 2019 in Linux / Unix by backtothefuture (552k points) | 358 views
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users