Grafana deployment

  • The website address
https://grafana.com/grafana/download
Copy the code

The RPM installation

  • The installation process
/ root @ grafana ~ # wget HTTP: / / https://dl.grafana.com/oss/release/grafana-6.5.0-1.x86_64.rpm/root @ grafana ~ # yum localinstall Grafana 6.5.0-1. X86_64. RPMCopy the code

The configuration file is located in /etc/grafana/grafana.ini, so keep the default configuration for the time being.

  • Set boot to start automatically
[root@grafana ~]# systemctl enable grafana-server
[root@grafana ~]# systemctl start grafana-server
Copy the code

The tar installation

  • The installation process
/ root @ grafana ~ # wget HTTP: / / https://dl.grafana.com/oss/release/grafana-6.5.0.linux-amd64.tar.gz/root @ grafana ~ # tar ZXVF. - Grafana-6.5.0. linux-amd64.tar.gz -c /usr/local [root@grafana ~]# ln -sv /usr/local/grafana-6.5.0.linux-amd64/ /usr/local/Prometheus_grafanaCopy the code
  • Background starts Grafana
[root@grafana ~]# nohup /usr/local/Prometheus_grafana/bin/grafana-server --config=/usr/local/Prometheus_grafana/conf/defaults.ini --homepath=/usr/local/Prometheus_grafana &
Copy the code
  • Configure Systemd to start Grafana
[root@grafana ~]# vim /lib/systemd/system/grafana-server.service [Unit] Description=Grafana After=network.target [Service] ExecStart=/usr/local/Prometheus_grafana/bin/grafana-server - the config = / usr/local/Prometheus_grafana/conf/defaults. Ini [Install] WantedBy = multi - user. Target # reload and set up the boot from the rev [root@grafana ~]# systemctl daemon-reload [root@grafana ~]# systemctl start grafana-server [root@grafana ~]#systemctl enable grafana-serverCopy the code

Access the graphical interface

After startup, enter the URL of the configuration machine in the web page. The default port is 3000 and http://localhost:3000 (the default account/password is admin/admin).

  • After login, change the password

  • Add a data source and select Prometheus by default

  • Import Dashboards
# If you want to configure a more convenient graphical interface and Chinese version of the dashboard, you can directly copy the ID from the official website. Configure official Dashboards https://grafana.com/grafana/dashboards # # percona provides the json packages https://github.com/percona/grafana-dashboardsCopy the code
  • The configuration steps

Click on the left sidebar to go to Create->Import and Import the Dashboards ID, or download the JSON package from the official website and Upload it to the Dashboards file

Different monitoring standards can be divided into multiple dashboard groups.