cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1566
Views
0
Helpful
3
Replies

How to automate 'clustercheck'

Rayman_Jr
Level 1
Level 1

Is there any way to automate the 'clustercheck' ? Today I was troubleshooting a problem for hours before I realized that my cluster was not properly in sync :?

I really would like to get alerted if the cluster configuration for any reason is not consistent. Have anyone found a way to do that ?

3 Replies 3

shannon.hagan
Level 1
Level 1

If you have a box that can ssh in via trusted keys:
echo "clustermode cluster;clustercheck"|ssh -t machinename

Then you could mailx to yourself.
echo "clustermode cluster;clustercheck"|ssh -t machinename|mailx -s "Cluster information" -r postmaster@mydomain usertosendto@mydomain

You could make a bash script that could check for a result that did not include "No inconsistencies found" and only mail if that was the case.

Rayman_Jr
Level 1
Level 1

Excellent.

It works nicely, thank you !

shannon.hagan
Level 1
Level 1

:D