hi guys,
I know this thread is a bit old but I am hoping you guys can help as this is the most closest thread I've seen with the issues that I am having.
zabbix server: 6.0.29 (RHEL 8.9)
zabbix_agent2: 6.0.26 (RHEL 9.3)
I am new to zabbix and trying to setup salt-minion.service to restart if the service is either failed/inactive. My script looks the same as V1ktor's as I essentially copied his config, which can be found here https://www.zabbix.com/forum/zabbix-...stemd-services. I substituted mysql for salt-minion.

Then I created Trigger actions under Configuration-> Actions -> trigger actions
then the operations
on the client server, I modified the following files;
1. modified /etc/sudoers and added:
zabbix ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart salt-minion.service
2. modified /etc/zabbix/zabbix_agent2.conf and added:
AllowKey=system.run[*]
3. I restarted the zabbix-agent service.
4. I then stopped the salt-minion.service to test the script but I when I look on the monitor dashboard, nothing happens, I don't see any changes and when looking at zabbix server's /var/log/zabbix_server.log, this is the only entry I see
6426:20240520:172142.721 Zabbix agent item "systemd.unit.get["salt-minion.service"]" on host "test-server" failed: another network error, wait for 15 seconds
on the client server, I don't see any entry related to salt-minion server in /var/log/zabbix_agent2.log
I feel like I'm very close but not sure where to go from here.
Thanks for looking and any advice would be appreciated.
I know this thread is a bit old but I am hoping you guys can help as this is the most closest thread I've seen with the issues that I am having.
zabbix server: 6.0.29 (RHEL 8.9)
zabbix_agent2: 6.0.26 (RHEL 9.3)
I am new to zabbix and trying to setup salt-minion.service to restart if the service is either failed/inactive. My script looks the same as V1ktor's as I essentially copied his config, which can be found here https://www.zabbix.com/forum/zabbix-...stemd-services. I substituted mysql for salt-minion.
Then I created Trigger actions under Configuration-> Actions -> trigger actions
then the operations
on the client server, I modified the following files;
1. modified /etc/sudoers and added:
zabbix ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart salt-minion.service
2. modified /etc/zabbix/zabbix_agent2.conf and added:
AllowKey=system.run[*]
3. I restarted the zabbix-agent service.
4. I then stopped the salt-minion.service to test the script but I when I look on the monitor dashboard, nothing happens, I don't see any changes and when looking at zabbix server's /var/log/zabbix_server.log, this is the only entry I see
6426:20240520:172142.721 Zabbix agent item "systemd.unit.get["salt-minion.service"]" on host "test-server" failed: another network error, wait for 15 seconds
on the client server, I don't see any entry related to salt-minion server in /var/log/zabbix_agent2.log
I feel like I'm very close but not sure where to go from here.
Thanks for looking and any advice would be appreciated.
Comment