filmov
tv
How to Monitor MySQL or MariaDB Database Server Using Icinga2 On Ubuntu 22.04 LTS Server
![preview_player](https://i.ytimg.com/vi/joztxRqUu8s/maxresdefault.jpg)
Показать описание
In this video, you will learn how to configure Icinga to monitor your MySQL source and replica servers in your clusters.
You will learn how to use the check-mysql-health plugin to monitor various states of your MySQL database. Such as the database uptime, database size, the clients that are currently connected to the database, and the replication status.
PLEASE SUBSCRIBE :)
PLEASE HIT LIKE IF IT HELPED :)
LINKS:
Steps:
mysql -u root -p
apt --no-install-recommends install monitoring-plugins-contrib
/usr/lib/nagios/plugins/check_mysql_health -h
import "generic-host"
check_command = "hostalive"
}
import "generic-host"
check_command = "hostalive"
}
apply Service "mysql-uptime" {
import "generic-service"
display_name = "MySQL Uptime"
check_command = "mysql_health"
}
apply Service "mysql-threads-connected" {
import "generic-service"
display_name = "MySQL Open Connections"
check_command = "mysql_health"
}
sudo mkdir /var/cache/nagios
sudo chown nagios:nagios /var/cache/nagios
apply Service "mysql-slow-queries" {
import "generic-service"
display_name = "MySQL Slow Queries"
check_command = "mysql_health"
}
apply Service "mysql-long-running-procs" {
import "generic-service"
display_name = "MySQL Long Running Processes"
check_command = "mysql_health"
}
mysql -u root -p
import "generic-host"
check_command = "hostalive"
}
apply Service "mysql-replica-lag" {
import "generic-service"
display_name = "MySQL Replica Lag"
check_command = "mysql_health"
}
apply Service "mysql-replica-io-status" {
import "generic-service"
display_name = "MySQL Replica IO Status"
check_command = "mysql_health"
}
apply Service "mysql-replica-sql-status" {
import "generic-service"
display_name = "MySQL Replica SQL Status"
check_command = "mysql_health"
}
Chapters:
00:00 Intro
00:33 Create icinga MySQL user
01:20 Install plugins
02:00 Modify object Host file
02:22 apply Service for uptime
03:28 apply Service for threads-connected
04:54 apply Service for slow-queries
06:15 apply Service for long-running-procs
08:03 Grant replication permission
09:01 apply Service for slave-lag
09:58 apply Service for slave-io-running
10:50 apply Service for slave-sql-running
13:10 Outro
You will learn how to use the check-mysql-health plugin to monitor various states of your MySQL database. Such as the database uptime, database size, the clients that are currently connected to the database, and the replication status.
PLEASE SUBSCRIBE :)
PLEASE HIT LIKE IF IT HELPED :)
LINKS:
Steps:
mysql -u root -p
apt --no-install-recommends install monitoring-plugins-contrib
/usr/lib/nagios/plugins/check_mysql_health -h
import "generic-host"
check_command = "hostalive"
}
import "generic-host"
check_command = "hostalive"
}
apply Service "mysql-uptime" {
import "generic-service"
display_name = "MySQL Uptime"
check_command = "mysql_health"
}
apply Service "mysql-threads-connected" {
import "generic-service"
display_name = "MySQL Open Connections"
check_command = "mysql_health"
}
sudo mkdir /var/cache/nagios
sudo chown nagios:nagios /var/cache/nagios
apply Service "mysql-slow-queries" {
import "generic-service"
display_name = "MySQL Slow Queries"
check_command = "mysql_health"
}
apply Service "mysql-long-running-procs" {
import "generic-service"
display_name = "MySQL Long Running Processes"
check_command = "mysql_health"
}
mysql -u root -p
import "generic-host"
check_command = "hostalive"
}
apply Service "mysql-replica-lag" {
import "generic-service"
display_name = "MySQL Replica Lag"
check_command = "mysql_health"
}
apply Service "mysql-replica-io-status" {
import "generic-service"
display_name = "MySQL Replica IO Status"
check_command = "mysql_health"
}
apply Service "mysql-replica-sql-status" {
import "generic-service"
display_name = "MySQL Replica SQL Status"
check_command = "mysql_health"
}
Chapters:
00:00 Intro
00:33 Create icinga MySQL user
01:20 Install plugins
02:00 Modify object Host file
02:22 apply Service for uptime
03:28 apply Service for threads-connected
04:54 apply Service for slow-queries
06:15 apply Service for long-running-procs
08:03 Grant replication permission
09:01 apply Service for slave-lag
09:58 apply Service for slave-io-running
10:50 apply Service for slave-sql-running
13:10 Outro
Комментарии