You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
2.2 KiB
99 lines
2.2 KiB
[%
|
|
hostname = ngcp.get_hostname();
|
|
|
|
is_proxy = ngcp.has_role(hostname, 'proxy');
|
|
is_lb = ngcp.has_role(hostname, 'lb');
|
|
is_mgmt = ngcp.has_role(hostname, 'mgmt');
|
|
is_db = ngcp.has_role(hostname, 'db');
|
|
is_rtp = ngcp.has_role(hostname, 'rtp');
|
|
-%]
|
|
[% PERL -%]
|
|
my $node_state = qx(ngcp-check-active -v);
|
|
chomp $node_state;
|
|
|
|
$stash->set(node_state => $node_state);
|
|
[% END -%]
|
|
|
|
command:
|
|
|
|
"pgrep -c -f '[l]ua5.1 /usr/bin/prosody'":
|
|
[% IF is_proxy && prosody.enable == 'yes' && node_state == 'active' -%]
|
|
exit-status: 0
|
|
stdout:
|
|
- "1"
|
|
[% ELSE -%]
|
|
exit-status: 1
|
|
stdout: []
|
|
[% END -%]
|
|
stderr: []
|
|
|
|
"pgrep -c -f '[p]erl-fcgi-pm \\[NGCP::Panel\\]'":
|
|
[% IF is_mgmt && www_admin.enable == 'yes' -%]
|
|
exit-status: 0
|
|
stdout:
|
|
- "1"
|
|
[% ELSE -%]
|
|
exit-status: 1
|
|
stdout: []
|
|
[% END -%]
|
|
stderr: []
|
|
|
|
"pgrep -n -f '[k]amailio.*kamailio.proxy.pid'":
|
|
[% IF is_proxy && kamailio.proxy.start == "yes" && node_state == 'active' -%]
|
|
exit-status: 0
|
|
stdout:
|
|
- "/[0-9]+/"
|
|
[% ELSE -%]
|
|
exit-status: 1
|
|
stdout: []
|
|
[% END -%]
|
|
stderr: []
|
|
|
|
"pgrep -n -f '[k]amailio.*kamailio.lb.pid'":
|
|
[% IF is_lb && kamailio.lb.start == "yes" && node_state == 'active' -%]
|
|
exit-status: 0
|
|
stdout:
|
|
- "/[0-9]+/"
|
|
[% ELSE -%]
|
|
exit-status: 1
|
|
stdout: []
|
|
[% END -%]
|
|
stderr: []
|
|
|
|
process:
|
|
asterisk:
|
|
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
|
|
|
influxd:
|
|
running: true
|
|
|
|
kamailio:
|
|
running: [% (is_lb || is_proxy) && node_state == 'active' ? 'true' : 'false' %]
|
|
|
|
mediator:
|
|
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
|
|
|
[% IF general.ngcp_type == 'spce' -%]
|
|
ngcp-sems:
|
|
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
|
|
|
[% ELSE -%]
|
|
sems-pbx:
|
|
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
|
|
|
[% END -%]
|
|
ngcp-witnessd:
|
|
running: true
|
|
|
|
rate-o-mat:
|
|
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
|
|
|
rtpengine:
|
|
running: [% is_rtp && node_state == 'active' ? 'true' : 'false' %]
|
|
|
|
rtpengine-recording:
|
|
running: [% is_rtp && node_state == 'active' && rtpproxy.recording.enable == "yes" ? 'true' : 'false' %]
|
|
|
|
telegraf:
|
|
running: true
|