/var/lib/mysql/mysqld.log {
.....
postrotate
if test -x /usr/bin/mysqladmin && /usr/bin/mysqladmin ping &>/dev/null
then
/usr/bin/mysqladmin flush-logs
fi
endscript
}
select h.name, i.name, i.key_, hs.clock, hs.value
from
hosts h
join items i on h.hostid = i.hostid
join history_log hs on i.itemid = hs.itemid
where h.name = 'zabbix'