-
Problem report
-
Resolution: Cannot Reproduce
-
Trivial
-
None
-
5.0.1
-
None
-
Centos 8, MariaDB
Steps to reproduce:
- 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
- Stop MariaDB service on monitored host
- Status shown as DOWN on Zabbix server dashboard
- Started MariaDB service on monitored host and verified status running locally
- Status on Zabbix server still remains down even after few hours
- Restarted zabbix-agent2 on monitored host
- Status on Zabbix server upated to up
- ...
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