Hi everyone and thanks in advance to everybody will answer my question, that is:
the Systemd by Zabbix agent 2 template contains the following trigger: Systemd by Zabbix agent 2: {#UNIT.NAME}: Service is not running.
If for instance the chrony service will be down the problem "chrony.service: Service is not running" will be notice.
What I would like to do is create a one time script for restarting any service, not create a script for every single service.
What I would like to do is create a one time script for restarting any service, not create a script for every single service. So what I would like is the following command:
sudo /usr/bin/systemctl restart 'service to restart'.
I tried
sudo /usr/bin/systemctl restart {TRIGGER.DESCRIPTION}
sudo /usr/bin/systemctl restart {ITEM.VALUE1}
but they don't work.
How can I get the first chunk of the trigger name?
the Systemd by Zabbix agent 2 template contains the following trigger: Systemd by Zabbix agent 2: {#UNIT.NAME}: Service is not running.
If for instance the chrony service will be down the problem "chrony.service: Service is not running" will be notice.
What I would like to do is create a one time script for restarting any service, not create a script for every single service.
What I would like to do is create a one time script for restarting any service, not create a script for every single service. So what I would like is the following command:
sudo /usr/bin/systemctl restart 'service to restart'.
I tried
sudo /usr/bin/systemctl restart {TRIGGER.DESCRIPTION}
sudo /usr/bin/systemctl restart {ITEM.VALUE1}
but they don't work.
How can I get the first chunk of the trigger name?
Comment