From 0a22accdc90e68dc12a04a57097352b34d4d63cd Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 13 Oct 2023 17:30:13 +0200 Subject: [PATCH] MT#58511 monit: check for unix socket instead of TCP port As of git rev 511e1f69cc91 in templates (see "MT#58452 monit: Use a Unix socket for the httpd control access"), monit no longer listens on port 2812 but uses a Unix socket instead. Fixes: | not ok 848 - Port: tcp:2812: listening: doesn't match, expect: [true] found: [false] Change-Id: I9b16aac2ebbf14defdd2713f72c7362ab21d43b8 --- templates/411_process-ngcp-pro.yaml.tt2 | 16 ++++++++++++++++ templates/822_network-ports-ngcp-pro.yaml.tt2 | 5 ----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/templates/411_process-ngcp-pro.yaml.tt2 b/templates/411_process-ngcp-pro.yaml.tt2 index 94d4e52..fccd43b 100644 --- a/templates/411_process-ngcp-pro.yaml.tt2 +++ b/templates/411_process-ngcp-pro.yaml.tt2 @@ -91,3 +91,19 @@ command: stdout: - "[% is_mgmt && rest_api.enable == 'yes' ? '1' : '0' %]" stderr: [] + +# monit no longer listens on port 2812 but uses a unix socket: +file: + /run/monit/monit.sock: + exists: true + mode: "0640" + size: 0 + owner: root + group: root + filetype: socket + /run/monit/monit.pid: + exists: true + mode: "0644" + owner: root + group: root + filetype: file diff --git a/templates/822_network-ports-ngcp-pro.yaml.tt2 b/templates/822_network-ports-ngcp-pro.yaml.tt2 index dc86c7c..be3add1 100644 --- a/templates/822_network-ports-ngcp-pro.yaml.tt2 +++ b/templates/822_network-ports-ngcp-pro.yaml.tt2 @@ -8,11 +8,6 @@ host_ha_iface = out; -%] port: - # Monit - tcp:2812: - listening: true - ip: ["127.0.0.1"] - # snmpd udp:161: listening: true