daemon-rewrite/mysql: Implement storage of warn, crit, min and max (WIP)