I have a script on a Linux machine performing a check on our DB which results in either OK
or KO
depending on the result (good or bad).
I have configured a UserParameter
in the Zabbix Agent configuration which runs the script:
# Check the DB for number longer than 12 characters.
UserParameter=customcheck.longnumber, /usr/local/bin/longnumber.sh
I have a template in Zabbix with an Item:
- Name: longnumber
- Trigger: 1
- Key: customcheck.longnumber
- Type: Zabbix Agent
The trigger is configured as follows:
This seems to trigger a problem. But the problem has been solved, and it keeps triggering the problem. Altough the recovery expression is made, it does not solve/close the problem.
Zabbix Agent Logs show the 'OK' response:
3892:20200204:133550.537 Requested [customcheck.longnumber]
3892:20200204:133550.537 In zbx_popen() command:' /usr/local/bin/longnumber.sh'
3892:20200204:133550.652 EXECUTE_STR() command:' /usr/local/bin/longnumber.sh' len:2 cmd_result:'OK'
Any idea what could be the issue?
Best Answer
According to the documentation:
So, you don't need to configure the recovery expresion because you don't need extra 'checks' for the recovery.
Once the Problem expresión will be evaluated as FALSE it will recovery automatically if you set the OK event generation as Expresión: