mirror of
https://github.com/YunoHost-Apps/monitorix_ynh.git
synced 2024-09-03 19:46:06 +02:00
Add support to detect process from yunohost services
This commit is contained in:
parent
be52f3a414
commit
29986d229c
2 changed files with 15 additions and 0 deletions
|
@ -654,6 +654,9 @@ secure_log_date_format = %b %e
|
|||
{%- if phpfpm_installed == 'true' %}
|
||||
4 = php-fpm
|
||||
{%- endif %}
|
||||
5 = {% for process in process_infos.splitlines() %}{% if loop.index > 1 %}, {% endif -%}
|
||||
{{ process.split('|')[0] }}
|
||||
{%- endfor %}
|
||||
</list>
|
||||
<desc>
|
||||
slapd = LDAP server
|
||||
|
@ -664,6 +667,9 @@ secure_log_date_format = %b %e
|
|||
master = Postfix
|
||||
imap = Dovecot IMAP
|
||||
sshd = SSH server
|
||||
{%- for process in process_infos.splitlines() %}
|
||||
{{ process.split('|')[0] }} = {{ process.split('|')[1] }}
|
||||
{%- endfor %}
|
||||
</desc>
|
||||
rigid = 2, 0, 0, 0, 0, 0, 0, 0
|
||||
limit = 100, 1000, 1000, 1000, 1000, 1000, 1000, 1000
|
||||
|
|
|
@ -119,6 +119,15 @@ result = [generate_port_info("tcp", "4", port) for port in tcp4_port_list] + \
|
|||
result.sort()
|
||||
print('\n'.join(result))
|
||||
EOF
|
||||
)"
|
||||
readonly process_infos="$(python3 <<EOF
|
||||
import yaml, socket
|
||||
hard_coded_ports = ["25", "53", "80", "443", "587", "993"]
|
||||
with open("/etc/yunohost/services.yml", "r") as f:
|
||||
services = yaml.safe_load(f)
|
||||
results = ["%s|%s" % (k, v["description"]) for k, v in services.items()]
|
||||
print('\n'.join(results))
|
||||
EOF
|
||||
)"
|
||||
|
||||
if compgen -G /etc/php/*/fpm/pool.d; then
|
||||
|
|
Loading…
Add table
Reference in a new issue