Last updated 5th May 2020
What is Docker?
Docker is an open-source project that automates the deployment of applications within software containers.
What is Grafana?
Grafana is an open-source solution that allows you to transform data into graphs, for example.
To install Grafana, you need to use Docker. You can install it on different OVH solutions:
See the documentation available at this link to install Docker, based on your particular machine.
If you have an OVHcloud VPS, you can choose to install the "Docker on Ubuntu" distribution that includes a server that already has Docker.
Install Grafana in Docker
If you want to use Grafana on port 80 of your server, just use the following command:
docker run -i -p 80:3000 grafana/grafana
A Private SQL Server
Type of Private SQL
Your private SQL server must be "Docker" to be able to get the metrics.
Free activation on Performance hosting packages.
If you have a Performance hosting package, you can enable a Private SQL server for free by following this guide.
Order a Private SQL server
You can order a Private SQL server directly from your control panel.
- All new Private SQL servers are Docker servers.
Is my Private SQL Server Legacy or Docker?
The old Private SQL servers are Legacy servers (for example: "sqlprive-kx11111-009"), the new ones are Docker (for example: "sx11111-012"). They are two different infrastructures.
Get the token via the OVHcloud API
Connect to the OVHcloud API
Use the following link to connect to the OVHcloud API, and then click "Login" to connect.
Retrieve the token
Use the following function to retrieve the list of Private SQL servers in your account, and then click "Run":
Enter the name of your Docker Private SQL server through the following command:
In "graphEndpoint" you will find the data you need:
Connect to your Grafana
Access Grafan through your browser, with these credentials:
Add your data source
To do this, click on "Data Sources in the left column and then on "Add new.
Enter the following information:
- Name: The name of your data source. In our case, it could be "private SQL".
- Default: Yes.
- Type: "OpenTSDB".
- URL: Specify the content of the "host" field that you previously retrieved from the OVHcloud API.
- Access: "proxy"
- Http Auth: Check "Basic Auth" and uncheck "With Credentials".
- User: Specify the contents of the "readToken" field that you previously retrieved from the OVHcloud API.
- Password: Re-enter the contents of the "readToken" field that you previously retrieved from the OVHcloud API.
Do a connection test and if it works, add the data source.
Configure your "Dashboard"
Click Dahboards in the left column, and then click "Home" > "New".
You will then get a virgin control panel whose name you can change by clicking "Manage Dashboard" > "Settings".
You can save your control panel at any time by clicking the icon at the top.
A control panel consists of a line ("Row"). To add the first graphic, click on the green button and select "Add Panel" > "Graph".
In the "General" tab, enter the title of your graph, for example "RAM".
In the "Metrics" tab, check that your data source is correct, at the bottom right.
The first metric to enter is "memory.hierarchical_memory_limit", which refers to the maximum RAM allocated to your Private SQL server.
Then click "+ Query" to set the second metric «memory.rss», which refers to the RAM used by your server.
In the "Axes & Grid" tab, select the data unit in "Left Y" and then "Bytes".
- At the top right, select the time interval you want. This is the result obtained in the last 60 days.
We have included 3 examples of relevant metrics to track the performance of your Private SQL:
|Limit of RAM used|memory.hierarchical_memory_limit| |RAM used|memory.rss|
|Number of active MySQL connections|mysql.active_connections|
In the following link you will find official information on Docker metrics:
Join our community of users on https://community.ovh.com/en/.