Various Tutorials
  • About
  • Tutorials
    • 1. Instance for deployment
      • Create instance
      • Install and configure OCI CLI
      • OCI CLI small test
      • Install and configure Terraform
      • Terraform - small test
    • 2. OCI Networking &Terraform
      • 2.1 VCN (basics)
        • 2.1.1 Create a virtual network using Start VCN Wizard
        • 2.1.2 VCN & public subnet (step-by-step in Terraform)
        • 2.1.3 VCN & public subnet (new compartment)
        • 2.1.4 VCN, Terraform and Ansible (Nginx example)
        • 2.1.5 VCN & private subnet (step-by-step in Terraform)
      • 2.2
      • 2.3
    • 3. Untitled
    • 4. Untitled
    • 5. ATP and APEX
      • Setup Autonomous Database
        • Deploying ATP using OCI Interface
        • Deploy with OCI CLI
      • Setup APEX on ATP
      • Connect remotely to ATP
      • ATP, APEX and Jupyter
      • Demo
    • 6. MySQL
      • 6.1. The basics - OCI UI (MySQL DB System)
      • 6.2 The basics - OCI CLI (MySQL DB System)
      • 6.3 Access MySQL DB System
      • 6.4 HeatWave and MySQL DB Service
      • 6.5 Python SDK
      • 6.6 MySQL Replication (Compute Instances)
      • 6.7 Monitoring MySQL instances
        • Deploy MySQL instances
        • Monitoring tools
          • 1. Networking setup
          • 2. Prometheus setup
          • 3. MySQL Prometheus Exporter Setup
          • 4. Grafana setup
          • 5. Grafana metric graphs
    • 7. MySQL OCI &Terraform
      • 7.1 Deploy MySQL DB System with Terraform (basic tutorial)
      • 7.2 Deploy MySQL DB System with Terraform and access the system
      • 7.3 Endpoints
      • 7.4 Channels (troubleshooting)
        • Fixed MySQL source - MDS replication
      • 7.5 Channels (code)
Powered by GitBook
On this page
  • 4.1 Install Grafana
  • 4.2 Grafana and Prometheus
  1. Tutorials
  2. 6. MySQL
  3. 6.7 Monitoring MySQL instances
  4. Monitoring tools

4. Grafana setup

Previous3. MySQL Prometheus Exporter SetupNext5. Grafana metric graphs

Last updated 4 years ago

4.1 Install Grafana

Download Grafana from their official website:

Since this example is based on Ubuntu OS, I will perform my installation accordingly:

root@deploymentmachine:/home#  id
uid=0(root) gid=0(root) groups=0(root)
root@deploymentmachine:/home# apt-get install -y adduser libfontconfig1
root@deploymentmachine:/home# wget https://dl.grafana.com/oss/release/grafana_7.3.7_amd64.deb
root@deploymentmachine:/home#  dpkg -i grafana_7.3.7_amd64.deb

Start the Grafana service with SystemD

root@deploymentmachine:/home# systemctl daemon-reload 
root@deploymentmachine:/home# systemctl enable grafana-server.service
root@deploymentmachine:/home# systemctl  start grafana-server.service

Change the admin password...

root@deploymentmachine:/home# grafana-cli admin reset-admin-password Str0nkPasswd
INFO[02-02|10:12:23] Connecting to DB                         logger=sqlstore dbtype=sqlite3
INFO[02-02|10:12:23] Starting DB migrations                   logger=migrator

Admin password changed successfully ✔

root@deploymentmachine:/home#

... and make sure you can log in: http://<publicIP>:3000

4.2 Grafana and Prometheus

Once you logged in go to Configuration > Data Sources > Add Data Sources. And select Prometheus

Provide here the Public IP of the host where Prometheus is running, along with port 9000:

Time to create dashboards for monitoring :)

Download Grafana | Grafana LabsGrafana Labs
Logo