Notifications
Clear all
BugOverflow
1
Posty
2
Users
0
Reactions
2,520
Widok
0
06/09/2022 8:07 pm
Topic starter
error:
Preprocessing failed for: ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: NO) 1. Failed: cannot extract XML value with xpath "/resultset/row[field/text()='Uptime']/field[@name='Value']/text()": cannot parse xml value: Start tag expected, '<' not found
Requirements for template operation: 1.Install Zabbix agent and MySQL client. 2.Copy template_db_mysql.conf into folder with Zabbix agent configuration (/etc/zabbix/zabbix_agentd.d/ by default). Don't forget to restart zabbix-agent. 3.Create MySQL user for monitoring. For example: CREATE USER 'zbx_monitor'@'%' IDENTIFIED BY '<password>'; GRANT REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW ON *.* TO 'zbx_monitor'@'%'; For more information read the MySQL documentation https://dev.mysql.com/doc/refman/8.0/en/grant.html , please. 4.Create .my.cnf in home directory of Zabbix agent for Linux (/var/lib/zabbix by default) or my.cnf in c:\ for Windows. For example: [client] user='zbx_monitor' password='<password>' You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/384189-discussion-thread-for-official-zabbix-template-db-mysql Template tooling version used: 0.42
1 Answer
0
06/09/2022 8:10 pm
Topic starter
set home directory for zabbix user
- cat /etc/passwd
- find "zabbix" user
- if there is nonexistent string, change it to /var/lib/zabbix or any other default home for user
-
zabbix:x:123:128::/var/lib/zabbix:/usr/sbin/nologin
- nano /var/lib/zabbix/.my.cnf
-
[client] user='zbx_monitor' password='<password>'
- chown -R zabbix:zabbix /var/lib/zabbix
- service zabbix-agent restart