[Linux-HA] What should 'monitor' do?
outfox at sjtu.edu.cn
Wed Oct 5 10:38:33 MDT 2005
> 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
> 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
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> See also: http://linux-ha.org/ReportingProblems
Thanks & regards
More information about the Linux-HA