3. IS THIS HAPPENING TO YOU?
"The website is slow
because of the DB!"
"The API is slow
because of the DB!"
ME
"We need a bigger DB
cluster, ASAP!"
4. LET’S STOP IT: USAGE TARGET
Allow tech people to be autonomous
Monitor our databases and set up alerts…
… using standard OVH solutions!
For any open-source RDBMS (PostgreSQL, MySQL, MariaDB…)
For any provider (OVH, on-premises servers, other cloud providers…)
5. LET’S STOP IT: INFRA TARGET
Metrics Logs
Grafana Graylog
Or on-premises servers,
other cloud providers…
DB DB DB
WWW
Customers
OVH DB team
18. OVH LOGS (AKA LDP)
Everything starts with an OVH Logs account
Control Panel > Cloud > Logs Data Platform
Add one stream per log file
mysql-slow-queries
pgsql-logs
LDP quickstart
19. LOGS’ DATA-GATHERING TOOLS
Open-source tools
Logstash: data collection and log-parsing engine from Elastic
Grok: pattern matching filter
Create and configure one logstash per log file
Grok is the trickiest funniest part
Now available in the OVH Control Panel
OVH Logstash
for MySQL
21. SENDING DATA
Useful information is available in the OVH Control Panel
IP
Port
SSL cert
Filebeat
/etc/filebeat /filebeat.yml
Define which file to parse, multiline, and where to send it
Syslog
Define a destination
26. OVH METRICS
Order your Metrics account
Control Panel > Cloud > Metrics Platform
Get your write token
27. COLLECT YOUR METRICS
There are several options for doing this:
Homemade
Collectl, Collectd, Statsd...
Telegraf
28. TELEGRAF’S PLUG-INS
We’re using the following plug-ins:
System-related
▪ cpu, disk, diskio, system, network ...
Dbms
▪ PostgreSQL, MySQL
Homemade
▪ Exec
There are a lot more plug-ins in telegraf
Telegraf @ Github
34. EXPLOIT
Reports are fully readable
Graylog is really efficient for quick searches
Document URLs can be shared
Grafana is a powerful tool for visualisation
39. REMEMBER THIS SLOW QUERY
SELECT username
FROM customer
WHERE username LIKE '_wilfried%';
40. WHAT WE LEARNED INTERNALLY
Choose the right tools for the job
Grafana for dashboard (mix and match sources)
Graylog for search
Moving to Kibana
An infrastructure can be set up in less than a week
Three months down the road, we can expect…
A widely-adopted gamechanger
-30% slow queries
KPIs
41. A FEW WORDS ABOUT OUR OFFERS
Right now:
- OVH Cloud Databases: managed DB, up to 4GB RAM, no cluster
- … New Lab starting! For your high-end needs.
Bare metal performance
Clustered (minimum three hosts)
Horizontal scale
Will include LOGS and Metrics
Starting with PgSQL
OVHLabs
42. PS: WE ARE HIRING !
Sysadmin Super Hero and DBA enthusiast
☀️• Bordeaux/Toulouse/Lyon
• ⛅ Rennes/Nantes
🍺• Roubaix
Job offer!