[Linux-HA] What should 'monitor' do?

Sun, Xun outfox at sjtu.edu.cn
Wed Oct 5 10:38:33 MDT 2005

Hi Adam,
在2005年10月05日的21:52,Adam Moffett写道:
> If I create a resource script with a monitor action, what should it 
> report when asked to 'monitor'?

Do you mean ocf resource script? If so, the only thing that matters is
the return code. All your 'monitor' operation needs to do is:

If resource is working, then
	return $OCF_SUCCESS
> I looked at the IPaddr resource and it reports either "OK" or "down".  
> Whereas the Apache resource either returns a status of 1 (true) or 
> something like "httpd not running".
In shell world, 0 means true, and nonzero (not necessarily 1) means
> So I'm guessing there's multiple results that can mean the resource is 
> doing alright and anything else means the resource is not alright.  Is 
> that accurate?
> How is this better/different from the "status" operation?
No operation is better than the other. But 'monitor' operation is used
by resource manager to monitor the resource, while 'status' is not a
mandatory operation.
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
Thanks & regards
Sun, Xun

More information about the Linux-HA mailing list