-
Notifications
You must be signed in to change notification settings - Fork 1
/
smite.conf.redis
138 lines (115 loc) · 5.74 KB
/
smite.conf.redis
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# vim: set filetype=sh :: Vi/ViM
#---------------------------------------------------------------------
# smite.conf -- Configuration file for the hot spare daemon, smite.
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# General:
#---------------------------------------------------------------------
# Add the email address of the administrator which should receive error
# messages, notices, and system takeover announcements.
#---------------------------------------------------------------------
#ADMIN= # admin email address
#---------------------------------------------------------------------
# Pre-conditions before running this configuration
#---------------------------------------------------------------------
msg "config: checking for redis-cli"
type redis-cli > /dev/null 2>&1 ||
die "redis-cli does not exist on this system"
#---------------------------------------------------------------------
# Enter the primary ethernet device name. This ethernet device will be
# aliased during a failover condition. Can be left empty if only one
# active (non-loopback) network interface is active.
#---------------------------------------------------------------------
#DEVICE= # primary ethernet device
#---------------------------------------------------------------------
# Monitored Process:
#---------------------------------------------------------------------
# The following IP address is the IP address for the monitored process
# in the master server and hot spare configuration. It can be an IP address
# that is shared and portable between the master server and the hot
# spare server or it can be the master server's own IP address for its
# ethernet device.
#
# WARNING: If you use the master server's own IP address for smite, the
# server will be unresponsive after the hot spare takes over the address.
# This is the case for both automated failover and for user-initiated
# failover. To access the server after a failover has taken place, you
# will need to use a direct connect console or IPMI connection as the
# host will not have an IP address associated with its ethernet device.
#
# If netmask is left empty, the network mask of the primary ethernet
# device is used. If the primary network device is not configured smite
# will refuse to start, requiring you to set netmask below.
#---------------------------------------------------------------------
###
### Settings for VIP management
###
#IPADDR=
#NETMASK=
###
### Settings for AWS Elastic IP (EIP) management
###
#AWS_EIP_ALLOCATION_ID=eipalloc-XXXXXXXXXXXXXXXXX
#AWS_ACCESS_KEY_ID=
#AWS_ACCESS_KEY_SECRET=
#AWS_DEFAULT_REGION=
#---------------------------------------------------------------------
# The next section is the configuration for the monitored process both
# locally on the master server and remotely by the hot spare server.
# The text IPADDR is globally replaced with $IPADDR before execution.
#
# The test command execution, whether local or remote, must return
# one of the following:
#
# exit code 0 for success, any other integer for failure
# string matches for sucess, does not match for failure
#---------------------------------------------------------------------
LOCAL_TEST_CMD="/usr/local/bin/redistest"
REMOTE_TEST_CMD="/usr/local/bin/redistest IPADDR"
#---------------------------------------------------------------------
# If required by the hot spare system, specify a command that must be
# executed before/after any failover. This command can be something
# simple like:
#
# mysql -e "stop slave;"
#
# If either command fails, it will not prevent failover from occuring.
# You will receive an email to the $ADMIN address supplied.
#---------------------------------------------------------------------
PREIP_CMD="/usr/local/bin/redistest stop"
# command run during failover
# before IP updates
POSTIP_CMD=""
# command run during failover
# after IP updates
#---------------------------------------------------------------------
# You must specify how many failures in a row must occur before "the"
# hot spare will takeover for the master. Also, you need to specify the
# time in seconds between each test. If you specify 3 failures before
# executing a failover and you specify a 5 second test interval, failover
# will not occur until 15 seconds has passed.
#---------------------------------------------------------------------
#RETRIES=3 # number of retries before failover
#INTERVAL=3 # test every # seconds
#---------------------------------------------------------------------
# Some tests will hang if the server is unresponsive. You can specify the
# timeout for the test command to respond. This value should be
# slightly greater than the time for the process to respond during
# peak traffic. If you specify this value too small, you may have
# false positives during peak traffic times and cause unnecessary
# failovers to occur.
#---------------------------------------------------------------------
#TIMEOUT=3 # timeout for test to complete
#---------------------------------------------------------------------
# You must also specify a network test IP address or addresses that
# will respond to a ping test successfully. This is used to verify
# that there are no local network issues that may have caused a failure.
# This can only be left empty if your machine has a ping-able default
# gateway or (failing that) a ping-able primary nameserver (pulled from
# resolv.conf(5)).
#---------------------------------------------------------------------
#TESTADDR= # if failure, test this with ping
# to make sure network is okay
#---------------------------------------------------------------------
# END
#---------------------------------------------------------------------