[ZBX-18039] zabbix-agent2 mysql status monitoring Created: 2020 Jul 09  Updated: 2024 Apr 10  Resolved: 2022 Nov 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 5.0.1
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Mohammad Awis Rusli Assignee: Eriks Sneiders
Resolution: Cannot Reproduce Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Centos 8, MariaDB


Attachments: PNG File image-2020-07-09-17-44-24-443.png     PNG File image-2020-07-09-17-45-33-416.png     PNG File image-2020-07-09-17-52-32-463.png     PNG File image-2020-07-13-11-09-05-695.png     PNG File image-2020-07-13-11-09-43-962.png     PNG File image-2020-07-13-11-10-39-593.png     File zabbix_agent2-1.conf     File zabbix_agent2.conf     Text File zabbix_agent2.log    
Issue Links:
Duplicate
is duplicated by ZBX-18108 Msql module doesn't respawn named ses... Closed
is duplicated by ZBX-18519 Zabbix agent2 return wrong ping value... Closed
Team: Team INT

 Description   

Steps to reproduce:

  1. Deployed zabbix-agent2 in MariaDB instance to monitor database related services. Most parameter updates are wokring but the MySQL status is not working as expected. Able to show DOWN status but status remains DOWN eventhough the service is already running on the monitored host. Status is only updated after the zabbix-agent2 on the host is restarted
  2. Stop MariaDB service on monitored host
  3. Status shown as DOWN on Zabbix server dashboard
  4. Started MariaDB service on monitored host and verified status running locally
  5. Status on Zabbix server still remains down even after few hours
  6. Restarted zabbix-agent2 on monitored host
  7. Status on Zabbix server upated to up
  8. ...

Result:
Screenshot below showing the status in zabbix server for mariadb services stopped

Real status of MariaDB service on the monitored host:

The log below showing the zabbix-agent2 activity

2020/07/09 16:32:35.945539 failed to execute direct exporter task for key 'mysql.get_status_variables["tcp://localhost:3306","<username>","<password>"]' error: 'sql: database is closed'
2020/07/09 16:32:36.947989 received passive check request: 'mysql.ping["tcp://localhost:3306","<username>","<password>"]' from '<zabbix_server_IP>'
2020/07/09 16:32:36.948069 [1] adding new request for key: 'mysql.ping["tcp://localhost:3306","<username>","<password>"]'
2020/07/09 16:32:36.948075 [1] created direct exporter task for plugin 'Mysql' itemid:0 key 'mysql.ping["tcp://localhost:3306","<username>","<password>"]'
2020/07/09 16:32:36.948108 executing direct exporter task for key 'mysql.ping["tcp://localhost:3306","<username>","<password>"]'
2020/07/09 16:32:36.948128 executed direct exporter task for key 'mysql.ping["tcp://localhost:3306","<username>","<password>"]'
2020/07/09 16:32:37.949634 received passive check request: 'mysql.version["tcp://localhost:3306","<username>","<password>"]' from '<zabbix_server_IP>'
2020/07/09 16:32:37.949728 [1] adding new request for key: 'mysql.version["tcp://localhost:3306","<username>","<password>"]'
2020/07/09 16:32:37.949738 [1] created direct exporter task for plugin 'Mysql' itemid:0 key 'mysql.version["tcp://localhost:3306","<username>","<password>"]'
2020/07/09 16:32:37.949791 executing direct exporter task for key 'mysql.version["tcp://localhost:3306","<username>","<password>"]'
2020/07/09 16:32:37.949813 failed to execute direct exporter task for key 'mysql.version["tcp://localhost:3306","<username>","<password>"]' error: 'sql: database is closed'

When running the command shown in logs, able to get value of the service running

[root@clusternode1-db ~]# zabbix_agent2 -t mysql.ping["tcp://localhost:3306","<username>","<password>"]
mysql.ping[tcp://localhost:3306,<username>,<password>][s|1]

 

Testing from zabbix server template gave different results

Expected:
The status should show up like how it is for zabbix-agentd



 Comments   
Comment by Renats Valiahmetovs (Inactive) [ 2020 Jul 10 ]

Hello Mohammad,

Thank you for reaching Zabbix public tracker!

To clarify, you're having an issue with the template trigger not resolving itself when status of MariaDB is back to normal, correct?

If that is the case, is it possible for you to perform another check, by stopping MariaDB again, but this time also send me a screenshot of the item values, just to see what is going on with the collected data before shutting MariaDB down, during and after it's started again.

As of now, I am unable to reproduce the issue, unfortunately.

 

Best Regards,

Renats

Comment by Mohammad Awis Rusli [ 2020 Jul 13 ]

Hi,

 

Yes, that's what we are facing right now. Below are the screenshots

Before stopping MariaDB services

 

MariaDB service stopped

 

MariaDB service started back; Zabbix still showing down

Comment by Renats Valiahmetovs (Inactive) [ 2020 Jul 13 ]

Good morning Mohammad,

I will also need a screenshot of this item configuration. Please do not forget to omit sensitive information regarding your environment.

And provide your zabbix_agentd.log file located on your DB host machine.

Best Regards,

Renats

Comment by Mohammad Awis Rusli [ 2020 Jul 13 ]

Hi,

 

Attached are the configuration and log files for. We are using Zabbix Agent 2 for this setup.

zabbix_agent2.conf

zabbix_agent2.log

Comment by Renats Valiahmetovs (Inactive) [ 2020 Jul 14 ]

Dear Mohammad,

I have successfully replicated the issue and it will be passed to our development team.

 

Best Regards,

Comment by John Wayne [ 2020 Sep 11 ]

@rvaliahmetovs I can confirm this as well and it seems to be still a problem on `5.0.3`. Do you have any ETA when a fix will be available?

Is still a problem on the agent2 or the MySQL agent2 template?

Comment by Christoph Fischer [ 2021 Jan 25 ]

I can also confirm this issue under Zabbix 5.0.x with newest template version. Thank you for your investigation.

Comment by Stev Leibelt [ 2021 Apr 21 ]

Glad to read that I am not alone.

 

I just did some checks. I can log in as zabbix user on the machine. I can log in as the zabbix user from a different machine (my.cnf bind-address = 0.0.0.0).

But the "MySQL: Service is down" stays the same.

Comment by Juri Malinovski [ 2021 Jul 06 ]

@Vadim Ipatov any news from you? Jule 06 2021

Comment by dimir [ 2021 Jul 06 ]

He's not working for Zabbix any more, but I'll try to get this one some attention.

Generated at Sun Mar 16 03:34:42 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.