Yes it is. You just need to play a little bit with the metric selector and add a delta transformation so you can easily create a metric event when hosť is turned on.
Use builtin:host.uptime - the host uptime metric and alert when uptime is below certain time. (most simple solution - but does not distinguish between reboots and OneAgents offline)
Use builtin:host.availability:splitBy(“dt.entity.host”):delta metric selector and alert if value is non-zero. The delta transformation helps to filter only the spikes when the host (OneAgent) comes online.
Use the builtin:host.availability.state:filter(and(or(eq(“availability.state”,up)))):splitBy(“dt.entity.host”):default(0,always):delta to filter just for availability up states. default transformation adds zero and delta transformation assures the final metric will show only the state changes. - this metric however does not work for paas agents (only for full stack agents).