I tried to solve and reproduce in one line over userparameter:
This line return how many hours since last file modification in a given path.
and tested by zabbix_get:
I hope I have helped someone here.
Thanks
Code:
UserParameter=check.folder_age[*], CUR_TIME=$(stat --printf=%Y $1/$(ls -t $1 | head -1)) && FILE_AGE=$(($(date +%s) - $CUR_TIME)) && echo $(($FILE_AGE / 3600))
and tested by zabbix_get:
Code:
/var/lib/zabbix # zabbix_get -s 192.168.1.1 -k check.folder_age[/mnt/current/backup/db] 352
Thanks
Comment