icinga2 - Monitor managed MySQL Server from Icinga -


i using azure managed mysql server host dbs.

i want monitor using test connection 1 of db whether server or not. how can add check icinga2 service?

ps - aware of check_mysql command how use it? working example helpful. thanks

the bare minimum you'll need is:

check_mysql [-d database][-h host][-p port][-u user][-p password] 

the text in icinga2 is:

object checkcommand "mysql" {     import "plugin-check-command"     command = [ plugindir + "/check_mysql" ]     timeout = 1m     arguments += {         "-c" = "$mysql_cacert$"         "-d" = "$mysql_cadir$"         "-h" = "$mysql_hostname$"         "-l" = "$mysql_ciphers$"         "-p" = "$mysql_port$"         "-s" = {             set_if = "$mysql_check_slave$"         }         "-a" = "$mysql_cert$"         "-c" = "$mysql_critical$"         "-d" = "$mysql_database$"         "-f" = "$mysql_file$"         "-g" = "$mysql_group$"         "-k" = "$mysql_key$"         "-l" = {             set_if = "$mysql_ssl$"         }         "-n" = {             set_if = "$mysql_ignore_auth$"         }         "-p" = "$mysql_password$"         "-s" = "$mysql_socket$"         "-u" = "$mysql_username$"         "-w" = "$mysql_warning$"     }     vars.check_address = {         type = "function"     }     vars.check_ipv4 = false     vars.check_ipv6 = false     vars.mysql_hostname = "$check_address$" } 

so on host definition you'll need have:

vars.mysql_port = [port] vars.mysql_database = [database] vars.mysql_password = [password] vars.mysql_username = [user] vars.mysql_critical = [critical threshold] vars.mysql_warning = [warning threshold] 

if using icinga2 director it's alot easier. can make clone of command , create own fields.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -