Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Red Hat Cluster Suite Check
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
This is the base of a script I threw together to check the status of a RH cluster using the XML output from clustat.
It currently support two options:
-s, --service=serviceName
-c, --cluster
To check the overall status of the cluster use the "-c" option which currently checks that cluster status is "Quorate" and also checks the local status of the node as well as checking if rgmanager is running.
To check the state of a service use the "-s serviceName" option. This will check that the service is in a "started" state on any node. Don't use the long name displayed by clustat (ex: service:NFS) instead use the short name (ex: NFS).
Please feel free to update - this is my first python script... so I'm sure it's very rough around the edges.
It currently support two options:
-s, --service=serviceName
-c, --cluster
To check the overall status of the cluster use the "-c" option which currently checks that cluster status is "Quorate" and also checks the local status of the node as well as checking if rgmanager is running.
To check the state of a service use the "-s serviceName" option. This will check that the service is in a "started" state on any node. Don't use the long name displayed by clustat (ex: service:NFS) instead use the short name (ex: NFS).
Please feel free to update - this is my first python script... so I'm sure it's very rough around the edges.
Reviews (1)
byvrelease, February 19, 2013
Instead of using gethostname():
hostname = socket.gethostname()
to identify a local node and check its status
if node.attributes['name'].value == hostname:
is better use directly:
if node.attributes['local'].value == "1":
hostname = socket.gethostname()
to identify a local node and check its status
if node.attributes['name'].value == hostname:
is better use directly:
if node.attributes['local'].value == "1":