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.
system-tests/templates/410_process-ngcp.yaml.tt2

130 lines
4.3 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');
is_li_dist = ngcp.has_role(hostname, 'li_dist');
-%]
command:
"pgrep -c -f 'lua5\\.. /usr/bin/prosody'":
{{if and [% is_proxy && prosody.enable == 'yes' ? 1 : 0 %] .Vars.NODE_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 and [% is_proxy && kamailio.proxy.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}}
exit-status: 0
stdout:
- "/[0-9]+/"
{{else}}
exit-status: 1
stdout: []
{{end}}
stderr: []
"pgrep -n -f '[k]amailio.*kamailio.lb.pid'":
{{if and [% is_lb && kamailio.lb.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}}
exit-status: 0
stdout:
- "/[0-9]+/"
{{else}}
exit-status: 1
stdout: []
{{end}}
stderr: []
process:
asterisk:
running: {{if and [% is_proxy ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
prometheus:
running: [% monitoring.backend == 'prometheus' && monitoring.prometheus_server == 'prometheus' ? 'true' : 'false' %]
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters). Real name: prometheus-mysqld-exporter.
prometheus-mysq:
running: [% monitoring.backend == 'prometheus' ? 'true' : 'false' %]
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters). Real name: prometheus-nginx-exporter.
prometheus-ngin:
running: [% monitoring.backend == 'prometheus' && (is_mgmt || is_lb || is_li_dist) && nginx.enable ? 'true' : 'false' %]
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters). Real name: prometheus-node-exporter.
prometheus-node:
running: [% monitoring.backend == 'prometheus' ? 'true' : 'false' %]
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters). Real name: prometheus-process-exporter.
prometheus-proc:
running: [% monitoring.backend == 'prometheus' ? 'true' : 'false' %]
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters). Real name: prometheus-redis-exporter.
prometheus-redi:
running: [% monitoring.backend == 'prometheus' && (is_mgmt || is_lb || is_proxy || is_db || is_rtp) && redis.enable ? 'true' : 'false' %]
kamailio:
running: {{if and [% is_lb || is_proxy ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
ngcp-mediator:
running: {{if and [% is_proxy ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
sems-b2b:
running: {{if and [% is_proxy && b2b.enable == "yes" && general.ngcp_type != 'spce' ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
ngcp-sems:
running: [% general.ngcp_type == 'spce' ? 'true' : 'false' %]
ngcp-witnessd:
running: true
ngcp-rate-o-mat:
[% IF rateomat.ha_mode == 'active-active' -%]
running: [% is_proxy && rateomat.enable == "yes" ? 'true' : 'false' %]
[% ELSE -%]
running: {{if and [% is_proxy && rateomat.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
[% END -%]
nginx:
running: [% (is_mgmt || is_lb || is_li_dist) && nginx.enable == 'yes' ? 'true' : 'false' %]
perl-fcgi:
running: [% is_mgmt ? 'true' : 'false' %]
rtpengine:
running: {{if and [% is_rtp ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters). Real name: rtpengine-recording.
rtpengine-recor:
running: {{if and [% is_rtp && rtpengine.recording.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters). Real name: victoria-metrics.
victoria-metric:
running: [% monitoring.backend == 'prometheus' && monitoring.prometheus_server == 'victoria-metrics' ? 'true' : 'false' %]