move state machine for health into health check plugins and make it configurable '