RE: Monitoring services/customize failure criteria

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I am still a bit unclear about how/where the cluster software 
> monitors a
> resource I have added. 

/usr/share/cluster has the shell scripts used to manage resources,
however...

> I have added a script resource that 
> points to the
> init script of apache.

The Script resource is a generic resource (as opposed to the more
specific mysql, nfs, ip, file system, etc. resources.) The script
identified in the <script> section is responsible for properly starting,
stopping and verifying the resource is functioning properly. The script
needs to conform to LSB + OCF RA API draft specifications. This means a
script *must* accept as parameters, at a minimum for use with cluster
services, start, stop and status. These script must exit with 0 for
success and a non-zero value for any non-success condition (error,
warning, got up on the wrong side of the bed, whatever.)

> however I am not sure if it would do this for all scripts

Yes, it will.

> what if I use a custom script that does not require a
> start/stop parameter.

Only you can answer that since it's your script. I can't vouch for the
integrity of your cluster.

> How can I customize "failure criteria" for a cluster resource?

If you are using a Script resource, the script will get called with a
'status' parameter. It is totally up to you how you validate the
resource. Using Apache as an example, you can check for a pid file,
check that at least one httpd process shows up in the process list, open
a socket connection to the proper port to make sure it's listening, send
a complete HTTP request to httpd and parse the output - the
possibilities are many. It's your decision how you want to do the
validation.

Happy hacking!

--Jeff
Performance Engineer

OpSource, Inc.
http://www.opsource.net
"Your Success is Our Success"
  

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux