Path : /proc/2/root/var/lib/zabbix/ |
Current File : //proc/2/root/var/lib/zabbix/proxy_syn_check.sh |
#!/bin/bash var="$(cat /var/log/zabbix/zabbix_proxy.log|grep "failed to update local proxy configuration"|cut -d ":" -f 2,3|cut -d "." -f 1| tail -n 1)" if [[ "$var" ]];then time="$(echo $var|cut -d ":" -f 2|sed 's/.\{2\}/& /g' | awk '{print $1":"$2":"$3}')" dt="$(echo $var|cut -d ":" -f 1)" unixtime="$(date -d "$dt $time" +%s)" echo $unixtime else unixtime=0 echo $unixtime fi