nitzien / zabbix-misc

zabbix-misc
25 stars 49 forks source link

My slave server is not reading the template #8

Open sgaurav7 opened 2 years ago

sgaurav7 commented 2 years ago

Hi, I followed all your steps and attached the template to my slave server. But when I stop slave for testing purpose, I am not able to receive the alert from zabbix. Can you please help me on this.

Thanks, Siddhartha Gaurav

nitzien commented 2 years ago

Hi Siddhartha,

Have you configured your zabbix agent to run in active mode?

What is result of following command on mysql slave server? zabbix_agentd -t Mysql.Slave-Status

Regards, Nitin

sgaurav7 commented 2 years ago

Hi Nitin,

I have configured the same and I am getting below output -

[root@xxxx ~]# zabbix_agentd -t Mysql.Slave-Status Mysql.Slave-Status [t|{"Slave_IO_State":"Waiting for master to send event","Master_Host":"xxxx","Master_User":"repl","Master_Port":"3306","Connect_Retry":"60","Master_Log_File":"mysql-bin.000547","Read_Master_Log_Pos":"912026844","Relay_Log_File":"server-22-relay-bin.000049","Relay_Log_Pos":"912027139","Relay_Master_Log_File":"mysql-bin.000547","Slave_IO_Running":"Yes","Slave_SQL_Running":"Yes","Replicate_Do_DB":"","Replicate_Ignore_DB":"","Replicate_Do_Table":"","Replicate_Ignore_Table":"","Replicate_Wild_Do_Table":"","Replicate_Wild_Ignore_Table":"","Last_Errno":"0","Last_Error":"","Skip_Counter":"0","Exec_Master_Log_Pos":"912026844","Relay_Log_Space":"912027491","Until_Condition":"None","Until_Log_File":"","Until_Log_Pos":"0","Master_SSL_Allowed":"No","Master_SSL_CA_File":"","Master_SSL_CA_Path":"","Master_SSL_Cert":"","Master_SSL_Cipher":"","Master_SSL_Key":"","Seconds_Behind_Master":"0","Master_SSL_Verify_Server_Cert":"No","Last_IO_Errno":"0","Last_IO_Error":"","Last_SQL_Errno":"0","Last_SQL_Error":"","Replicate_Ignore_Server_Ids":"","Master_Server_Id":"2","Master_SSL_Crl":"","Master_SSL_Crlpath":"","Using_Gtid":"No","Gtid_IO_Pos":"","Replicate_Do_Domain_Ids":"","Replicate_Ignore_Domain_Ids":"","Parallel_Mode":"optimistic","SQL_Delay":"0","SQL_Remaining_Delay":"NULL","Slave_SQL_Running_State":"Slave has read all relay log; waiting for more updates","Slave_DDL_Groups":"0","Slave_Non_Transactional_Groups":"0","Slave_Transactional_Groups":"0"}] [root@xxxx ~]#

For testing purpose, I stop the slave and monitor on the zabbix portal but it is not reflecting and I am not getting any alert.

Thanks, Siddhartha Gaurav

sgaurav7 commented 2 years ago

Hi @nitzien - Any solution for above issue?