1OCF_HEARTBEAT_KAMAIL(7)       OCF resource agents      OCF_HEARTBEAT_KAMAIL(7)
2
3
4

NAME

6       ocf_heartbeat_kamailio - Resource agent for Kamailio
7

SYNOPSIS

9       kamailio [start | stop | status | monitor | meta-data | validate-all]
10

DESCRIPTION

12       Resource agent for the Kamailio SIP proxy/registrar. Multiple instances
13       are possible when using following parameter combinations:
14
15       Parameters for Kamailio instance 1: listen_address=192.168.159.128
16       monitoring_ip=192.168.159.128 proto=udptcp port=5060
17
18       Parameters for Kamailio instance 2: listen_address=192.168.159.128
19       monitoring_ip=192.168.159.128 proto=udp port=5070
20       conffile=/etc/kamailio/kamailio2.cfg kamctlrc=""
21
22       Only one instance can be monitored via the command "kamctl monitor"
23       because the kamctl tool of kamailio 4.x is not designed for multiple
24       instances. Therefore, the provided kamctrlrc file path needs to be
25       empty for instance 2, 3 ...
26
27       Parameters for a third Kamailio instance:
28       listen_address=192.168.159.128 monitoring_ip=192.168.159.128 proto=tcp
29       port=5080 conffile=/etc/kamailio/kamailio3.cfg kamctlrc=""
30

SUPPORTED PARAMETERS

32       binary
33           The kamailio binary
34
35           (optional, string, default "/usr/sbin/kamailio")
36
37       conffile
38           The kamailio configuration file name with full path. For example,
39           "/etc/kamailio/kamailio.cfg" , which is the default value. Make
40           sure to use unique names in case of having multiple instances.
41
42           (optional, string, default "/etc/kamailio/kamailio.cfg")
43
44       pidfile
45           The kamailio PID file. The directory used must be writable by
46           kamailio process user. Be sure to use unique name for running more
47           than one instance. Try to use absolute path names. If empty,
48           resource agent create a unique directory from the resource instance
49           name for the PID file and assign it to the process user.
50
51           (optional, string, default
52           "/var/run/kamailio_RESOURCE_ID/kamailio.pid")
53
54       monitoring_ip
55           SIP IP Address of the kamailio instance used for SIP OPTIONS
56           polling monitoring. Usually the same IP address value as for
57           parameter listen_address should be provided.
58
59           In order to respond with a 200 OK response to the SIP OOPTION
60           requests, the kamailio.cfg file needs to contain following section:
61           Note: The following "kamailio.cfg" code snippet is part of an XML
62           section. Therefore it contains two & characters, which need to be
63           replaced with two ampersand characters within "kamailio.cfg":
64
65           if (is_method("OPTIONS") && (=~"sip:monitor@.*")) { ## ## If the
66           method is an OPTIONS we are simply going to respond ## with a 200
67           OK. # xlog("L_INFO", "Method is an OPTIONS, probably just
68           monitoring\n"); sl_send_reply("200", "Kamailio is alive"); exit; }
69
70           (optional, string, default "127.0.0.1")
71
72       listen_address
73           SIP IP address the kamailio will listen on.
74
75           (required, string, no default)
76
77       port
78           SIP port for the kamailio instance.
79
80           (optional, string, default "5060")
81
82       extra_options
83           Extra options to add to kamailio start.
84
85           (optional, string, no default)
86
87       proto
88           The protocol used for SIP proto =
89           udp|tcp|udptcp|conf_udp|conf_tcp|conf_udptcp. Using the options
90           "conf_*" does not add any "-l" parameters to the kamailio command,
91           the "listen" parameters from kamailio.conf are used instead. The
92           sipsak checks are performed depending what protocol is defined
93           after the underscore.
94
95           (optional, string, default "udptcp")
96
97       sipsak
98           The installation path of the sipsak tool, which is used for
99           monitoring Kamailio via SIP OPTIONS polling.
100
101           (optional, string, default "/usr/bin/sipsak")
102
103       kamctl
104           The installation path of the "kamctl" control tool.
105
106           (optional, string, default "/usr/bin/kamctl")
107
108       kamctlrc
109           The location of the "kamctlrc" file for the Kamailio instance. The
110           file "kamctlrc" is the Kamailio configuration file for its "kamctl"
111           control tool.
112
113           This parameter only needs to be provided in case of using multiple
114           Kamailio server instances on a single cluster node:
115
116           In case that the parameter "kamctlrc" is not empty, this resource
117           agent monitors the health state of the Kamailio server via the
118           command "kamctl monitor 1". This setting is recommended in case of
119           using a single Kamailio server instance.
120
121           In case that the parameter "kamctlrc" is empty, the resource agent
122           does not monitor the health state of the Kamailio server instance
123           via the "kamctl" command.
124
125           Please note that the "kamctl" control command of Kamailio 4.x does
126           not support running multiple Kamailio instances on one host.
127           Nevertheless this resource agent does allow multiple Kamailio
128           instances per host. The result of the "kamctl" limitation in terms
129           of number of Kamailio server instances is that the health check via
130           "kamctl monitor 1" can be configured for a single Kamailio instance
131           only.
132
133           Please refer to the long description of this resource agent for an
134           example of parameter combinations in case that multiple instances
135           are to be configured per cluster node.
136
137           (optional, string, default "/etc/kamailio/kamctlrc")
138
139       kamuser
140           The user account for kamailio process to run with. Uses the current
141           user, if not specified or empty. There is no check, if running
142           kamailio with the specified user account is possible.
143
144           (optional, string, no default)
145
146       kamgroup
147           The group for kamailio process to run with. Uses the current group,
148           if not specified or empty.
149
150           (optional, string, no default)
151

SUPPORTED ACTIONS

153       This resource agent supports the following actions (operations):
154
155       start
156           Starts the resource. Suggested minimum timeout: 60s.
157
158       stop
159           Stops the resource. Suggested minimum timeout: 30s.
160
161       status
162           Performs a status check. Suggested minimum timeout: 30s. Suggested
163           interval: 10s.
164
165       monitor
166           Performs a detailed status check. Suggested minimum timeout: 30s.
167           Suggested interval: 10s.
168
169       meta-data
170           Retrieves resource agent metadata (internal use only). Suggested
171           minimum timeout: 5s.
172
173       validate-all
174           Performs a validation of the resource configuration. Suggested
175           minimum timeout: 5s.
176
177       notify
178           Suggested minimum timeout: 5s.
179

EXAMPLE CRM SHELL

181       The following is an example configuration for a kamailio resource using
182       the crm(8) shell:
183
184           primitive p_kamailio ocf:heartbeat:kamailio \
185             params \
186               listen_address=string \
187             op monitor timeout="30s" interval="10s"
188

EXAMPLE PCS

190       The following is an example configuration for a kamailio resource using
191       pcs(8)
192
193           pcs resource create p_kamailio ocf:heartbeat:kamailio \
194             listen_address=string \
195             op monitor timeout="30s" interval="10s"
196

SEE ALSO

198       http://clusterlabs.org/
199

AUTHOR

201       ClusterLabs contributors (see the resource agent source for information
202       about individual authors)
203
204
205
206resource-agents UNKNOWN           11/03/2021           OCF_HEARTBEAT_KAMAIL(7)
Impressum