From fb2c995f53f6d48edd8f0eb8f9dec4dc8f43335c Mon Sep 17 00:00:00 2001 From: yozhao101 <56170650+yozhao101@users.noreply.github.com> Date: Wed, 9 Jun 2021 09:04:22 -0700 Subject: [PATCH] [202012][Monit] Deprecate the feature of monitoring the critical processes by Monit (#7823) Signed-off-by: Yong Zhao yozhao@microsoft.com Why I did it Currently we leveraged the Supervisor to monitor the running status of critical processes in each container and it is more reliable and flexible than doing the monitoring by Monit. So we removed the functionality of monitoring the critical processes by Monit. How I did it I removed the script process_checker and corresponding Monit configuration entries of critical processes. How to verify it I verified this on the device str-7260cx3-acs-1. --- .../base_image_files/monit_database | 7 -- .../docker-fpm-frr/base_image_files/monit_bgp | 27 ----- .../docker-lldp/base_image_files/monit_lldp | 15 --- .../base_image_files/monit_swss | 56 ----------- .../docker-sflow/base_image_files/monit_sflow | 7 -- .../docker-snmp/base_image_files/monit_snmp | 11 --- .../base_image_files/monit_restapi | 7 -- .../base_image_files/monit_telemetry | 9 -- .../docker-teamd/base_image_files/monit_teamd | 11 --- .../build_templates/sonic_debian_extension.j2 | 2 - files/image_config/monit/process_checker | 98 ------------------- platform/barefoot/docker-syncd-bfn.mk | 1 - .../base_image_files/monit_syncd | 7 -- platform/broadcom/docker-syncd-brcm.mk | 1 - .../base_image_files/monit_syncd | 11 --- platform/cavium/docker-syncd-cavm.mk | 1 - .../base_image_files/monit_syncd | 7 -- platform/centec/docker-syncd-centec.mk | 1 - .../base_image_files/monit_syncd | 7 -- platform/marvell-arm64/docker-syncd-mrvl.mk | 1 - .../base_image_files/monit_syncd | 7 -- platform/marvell-armhf/docker-syncd-mrvl.mk | 1 - .../base_image_files/monit_syncd | 7 -- platform/marvell/docker-syncd-mrvl.mk | 1 - .../base_image_files/monit_syncd | 7 -- platform/mellanox/docker-syncd-mlnx.mk | 1 - .../base_image_files/monit_syncd | 7 -- platform/nephos/docker-syncd-nephos.mk | 1 - .../base_image_files/monit_syncd | 11 --- rules/docker-database.mk | 1 - rules/docker-fpm-frr.mk | 1 - rules/docker-lldp.mk | 1 - rules/docker-orchagent.mk | 1 - rules/docker-restapi.mk | 1 - rules/docker-sflow.mk | 1 - rules/docker-snmp.mk | 1 - rules/docker-teamd.mk | 1 - 37 files changed, 338 deletions(-) delete mode 100644 dockers/docker-database/base_image_files/monit_database delete mode 100644 dockers/docker-fpm-frr/base_image_files/monit_bgp delete mode 100644 dockers/docker-lldp/base_image_files/monit_lldp delete mode 100644 dockers/docker-orchagent/base_image_files/monit_swss delete mode 100644 dockers/docker-sflow/base_image_files/monit_sflow delete mode 100644 dockers/docker-snmp/base_image_files/monit_snmp delete mode 100644 dockers/docker-sonic-restapi/base_image_files/monit_restapi delete mode 100644 dockers/docker-teamd/base_image_files/monit_teamd delete mode 100755 files/image_config/monit/process_checker delete mode 100644 platform/barefoot/docker-syncd-bfn/base_image_files/monit_syncd delete mode 100644 platform/broadcom/docker-syncd-brcm/base_image_files/monit_syncd delete mode 100644 platform/cavium/docker-syncd-cavm/base_image_files/monit_syncd delete mode 100644 platform/centec/docker-syncd-centec/base_image_files/monit_syncd delete mode 100644 platform/marvell-arm64/docker-syncd-mrvl/base_image_files/monit_syncd delete mode 100644 platform/marvell-armhf/docker-syncd-mrvl/base_image_files/monit_syncd delete mode 100644 platform/marvell/docker-syncd-mrvl/base_image_files/monit_syncd delete mode 100644 platform/mellanox/docker-syncd-mlnx/base_image_files/monit_syncd delete mode 100644 platform/nephos/docker-syncd-nephos/base_image_files/monit_syncd diff --git a/dockers/docker-database/base_image_files/monit_database b/dockers/docker-database/base_image_files/monit_database deleted file mode 100644 index 47c9d1b2d4..0000000000 --- a/dockers/docker-database/base_image_files/monit_database +++ /dev/null @@ -1,7 +0,0 @@ -############################################################################### -## Monit configuration for database container -## process list: -## redis_server -############################################################################### -check program database|redis_server with path "/usr/bin/process_checker database /usr/bin/redis-server" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/dockers/docker-fpm-frr/base_image_files/monit_bgp b/dockers/docker-fpm-frr/base_image_files/monit_bgp deleted file mode 100644 index 07705e8417..0000000000 --- a/dockers/docker-fpm-frr/base_image_files/monit_bgp +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################### -## Monit configuration for BGP container -## process list: -## zebra -## fpmsyncd -## bgpd -## staticd -## bgpcfgd -## bgpmon -############################################################################### -check program bgp|zebra with path "/usr/bin/process_checker bgp /usr/lib/frr/zebra" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program bgp|fpmsyncd with path "/usr/bin/process_checker bgp fpmsyncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program bgp|bgpd with path "/usr/bin/process_checker bgp /usr/lib/frr/bgpd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program bgp|staticd with path "/usr/bin/process_checker bgp /usr/lib/frr/staticd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program bgp|bgpcfgd with path "/usr/bin/process_checker bgp /usr/bin/python3 /usr/local/bin/bgpcfgd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program bgp|bgpmon with path "/usr/bin/process_checker bgp /usr/bin/python3 /usr/local/bin/bgpmon" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/dockers/docker-lldp/base_image_files/monit_lldp b/dockers/docker-lldp/base_image_files/monit_lldp deleted file mode 100644 index d470972ace..0000000000 --- a/dockers/docker-lldp/base_image_files/monit_lldp +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -## Monit configuration for lldp container -## process list: -## lldpd -## lldp-syncd -## lldpmgrd -############################################################################### -check program lldp|lldpd_monitor with path "/usr/bin/process_checker lldp lldpd:" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program lldp|lldp_syncd with path "/usr/bin/process_checker lldp python3 -m lldp_syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program lldp|lldpmgrd with path "/usr/bin/process_checker lldp python3 /usr/bin/lldpmgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/dockers/docker-orchagent/base_image_files/monit_swss b/dockers/docker-orchagent/base_image_files/monit_swss deleted file mode 100644 index d4ea5454ef..0000000000 --- a/dockers/docker-orchagent/base_image_files/monit_swss +++ /dev/null @@ -1,56 +0,0 @@ -############################################################################### -## Monit configuration for swss container -## process list: -## orchagent -## portsyncd -## neighsyncd -## fdbsyncd -## vrfmgrd -## vlanmgrd -## intfmgrd -## portmgrd -## buffermgrd -## nbrmgrd -## vxlanmgrd -## coppmgrd -## tunnelmgrd - -############################################################################## -check program swss|orchagent with path "/usr/bin/process_checker swss /usr/bin/orchagent -d /var/log/swss" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|portsyncd with path "/usr/bin/process_checker swss /usr/bin/portsyncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|neighsyncd with path "/usr/bin/process_checker swss /usr/bin/neighsyncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|fdbsyncd with path "/usr/bin/process_checker swss /usr/bin/fdbsyncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|vrfmgrd with path "/usr/bin/process_checker swss /usr/bin/vrfmgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|vlanmgrd with path "/usr/bin/process_checker swss /usr/bin/vlanmgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|intfmgrd with path "/usr/bin/process_checker swss /usr/bin/intfmgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|portmgrd with path "/usr/bin/process_checker swss /usr/bin/portmgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|buffermgrd with path "/usr/bin/process_checker swss /usr/bin/buffermgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|nbrmgrd with path "/usr/bin/process_checker swss /usr/bin/nbrmgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|vxlanmgrd with path "/usr/bin/process_checker swss /usr/bin/vxlanmgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|coppmgrd with path "/usr/bin/process_checker swss /usr/bin/coppmgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program swss|tunnelmgrd with path "/usr/bin/process_checker swss /usr/bin/tunnelmgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/dockers/docker-sflow/base_image_files/monit_sflow b/dockers/docker-sflow/base_image_files/monit_sflow deleted file mode 100644 index 84b36b18ce..0000000000 --- a/dockers/docker-sflow/base_image_files/monit_sflow +++ /dev/null @@ -1,7 +0,0 @@ -############################################################################### -## Monit configuration for sflow container -## process list: -## sflowmgrd -############################################################################### -check program sflow|sflowmgrd with path "/usr/bin/process_checker sflow /usr/bin/sflowmgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/dockers/docker-snmp/base_image_files/monit_snmp b/dockers/docker-snmp/base_image_files/monit_snmp deleted file mode 100644 index 6a368a9b60..0000000000 --- a/dockers/docker-snmp/base_image_files/monit_snmp +++ /dev/null @@ -1,11 +0,0 @@ -############################################################################### -## Monit configuration for snmp container -## process list: -## snmpd -## snmpd_subagent -############################################################################### -check program snmp|snmpd with path "/usr/bin/process_checker snmp /usr/sbin/snmpd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program snmp|snmp_subagent with path "/usr/bin/process_checker snmp python3 -m sonic_ax_impl" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/dockers/docker-sonic-restapi/base_image_files/monit_restapi b/dockers/docker-sonic-restapi/base_image_files/monit_restapi deleted file mode 100644 index 6752100b84..0000000000 --- a/dockers/docker-sonic-restapi/base_image_files/monit_restapi +++ /dev/null @@ -1,7 +0,0 @@ -############################################################################### -## Monit configuration for restapi container -## process list: -## restapi -############################################################################### -check program restapi|restapi with path "/usr/bin/process_checker restapi /usr/sbin/go-server-server" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/dockers/docker-sonic-telemetry/base_image_files/monit_telemetry b/dockers/docker-sonic-telemetry/base_image_files/monit_telemetry index ab3000c899..b3ba8b25fe 100644 --- a/dockers/docker-sonic-telemetry/base_image_files/monit_telemetry +++ b/dockers/docker-sonic-telemetry/base_image_files/monit_telemetry @@ -1,14 +1,5 @@ ############################################################################### ## Monit configuration for telemetry container -## process list: -## telemetry -## dialout_client ############################################################################### -check program telemetry|telemetry with path "/usr/bin/process_checker telemetry /usr/sbin/telemetry" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program telemetry|dialout_client with path "/usr/bin/process_checker telemetry /usr/sbin/dialout_client_cli" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - check program container_memory_telemetry with path "/usr/bin/memory_checker telemetry 419430400" if status == 3 for 10 times within 20 cycles then exec "/usr/bin/restart_service telemetry" diff --git a/dockers/docker-teamd/base_image_files/monit_teamd b/dockers/docker-teamd/base_image_files/monit_teamd deleted file mode 100644 index 626a614560..0000000000 --- a/dockers/docker-teamd/base_image_files/monit_teamd +++ /dev/null @@ -1,11 +0,0 @@ -############################################################################### -## Monit configuration for teamd container -## process list: -## teamsyncd -## teammgrd -############################################################################### -check program teamd|teamsyncd with path "/usr/bin/process_checker teamd /usr/bin/teamsyncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program teamd|teammgrd with path "/usr/bin/process_checker teamd /usr/bin/teammgrd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 4a2b93f80e..eecf4064ca 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -310,8 +310,6 @@ sudo cp $IMAGE_CONFIGS/monit/monitrc $FILESYSTEM_ROOT/etc/monit/ sudo chmod 600 $FILESYSTEM_ROOT/etc/monit/monitrc sudo cp $IMAGE_CONFIGS/monit/conf.d/* $FILESYSTEM_ROOT/etc/monit/conf.d/ sudo chmod 600 $FILESYSTEM_ROOT/etc/monit/conf.d/* -sudo cp $IMAGE_CONFIGS/monit/process_checker $FILESYSTEM_ROOT/usr/bin/ -sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/process_checker sudo cp $IMAGE_CONFIGS/monit/container_checker $FILESYSTEM_ROOT/usr/bin/ sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/container_checker sudo cp $IMAGE_CONFIGS/monit/memory_checker $FILESYSTEM_ROOT/usr/bin/ diff --git a/files/image_config/monit/process_checker b/files/image_config/monit/process_checker deleted file mode 100755 index 68c8f3e945..0000000000 --- a/files/image_config/monit/process_checker +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/python3 - -import argparse -import ast -import sys -import syslog - -import psutil -from sonic_py_common import multi_asic -import swsssdk - - -def check_process_existence(container_name, process_cmdline): - """ - @summary: Check whether the process in the specified container is running or not and - an alerting message will written into syslog if it failed to run. - """ - config_db = swsssdk.ConfigDBConnector() - config_db.connect() - feature_table = config_db.get_table("FEATURE") - - if container_name in feature_table: - # We look into the 'FEATURE' table to verify whether the container is disabled or not. - # If the container is diabled, we exit. - if ("state" in feature_table[container_name] - and feature_table[container_name]["state"] == "disabled"): - sys.exit(0) - else: - # We leveraged the psutil library to help us check whether the process is running or not. - # If the process entity is found in process tree and it is also in the 'running' or 'sleeping' - # state, then it will be marked as 'running'. - - # For given feature we get the host and network namespace instances it's processes should be running - # based on it's scope and add it to expected set. - - # From psutil we get number of running instances of the processes and add it to the the actual set - - # Difference bwetween expected and actual set provides instances where the processes are not running - # and will be logged as syslog message by monit - - process_namespace_expected_set = set() - process_namespace_found_set = set() - - has_global_scope = ast.literal_eval(feature_table[container_name].get('has_global_scope', 'True')) - has_per_asic_scope = ast.literal_eval(feature_table[container_name].get('has_per_asic_scope', 'False')) - - if has_global_scope: - process_namespace_expected_set.add(multi_asic.DEFAULT_NAMESPACE) - - if has_per_asic_scope: - process_namespace_expected_set.update(multi_asic.get_namespace_list()) - - for process in psutil.process_iter(["cmdline", "status", "pid"]): - try: - if ((' '.join(process.cmdline())).startswith(process_cmdline) and process.status() in ["running", "sleeping"]): - process_namespace_found_set.add(multi_asic.get_current_namespace(process.info['pid'])) - except psutil.NoSuchProcess: - pass - - process_namespace_diff_set = process_namespace_expected_set.difference(process_namespace_found_set) - - if process_namespace_diff_set: - host_display_str = "" - namespace_display_str = "" - - for ns in process_namespace_diff_set: - if ns == multi_asic.DEFAULT_NAMESPACE: - host_display_str = " in host" - else: - if not namespace_display_str: - namespace_display_str = " in namespace " + ns - else: - namespace_display_str += ", " + ns - - join_str = " and" if host_display_str and namespace_display_str else "" - - # If this script is run by Monit, then the following output will be appended to - # Monit's syslog message. - print("'{}' is not running{}{}{}".format(process_cmdline, host_display_str, join_str, namespace_display_str)) - sys.exit(1) - else: - syslog.syslog(syslog.LOG_ERR, "container '{}' is not included in SONiC image or the given container name is invalid!" - .format(container_name)) - - -def main(): - parser = argparse.ArgumentParser(description="Check whether the process in the specified \ - container is running and an alerting message will be written into syslog if it \ - failed to run.", usage="/usr/bin/process_checker ") - parser.add_argument("container_name", help="container name") - parser.add_argument("process_cmdline", nargs=argparse.REMAINDER, help="process command line") - args = parser.parse_args() - - check_process_existence(args.container_name, ' '.join(args.process_cmdline)) - - -if __name__ == '__main__': - main() diff --git a/platform/barefoot/docker-syncd-bfn.mk b/platform/barefoot/docker-syncd-bfn.mk index 3a5c693e2f..2ada27bed7 100644 --- a/platform/barefoot/docker-syncd-bfn.mk +++ b/platform/barefoot/docker-syncd-bfn.mk @@ -11,4 +11,3 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ $(LIBSAIREDIS_DBG) $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot -$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/barefoot/docker-syncd-bfn/base_image_files/monit_syncd b/platform/barefoot/docker-syncd-bfn/base_image_files/monit_syncd deleted file mode 100644 index 61e290e318..0000000000 --- a/platform/barefoot/docker-syncd-bfn/base_image_files/monit_syncd +++ /dev/null @@ -1,7 +0,0 @@ -############################################################################### -## Monit configuration for syncd container -## process list: -## syncd -############################################################################### -check program syncd|syncd with path "/usr/bin/process_checker syncd /usr/bin/syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/platform/broadcom/docker-syncd-brcm.mk b/platform/broadcom/docker-syncd-brcm.mk index d231414819..2e66979ea2 100644 --- a/platform/broadcom/docker-syncd-brcm.mk +++ b/platform/broadcom/docker-syncd-brcm.mk @@ -16,4 +16,3 @@ $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmsh:/usr/bin/bcmsh $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcm_common:/usr/bin/bcm_common -$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/broadcom/docker-syncd-brcm/base_image_files/monit_syncd b/platform/broadcom/docker-syncd-brcm/base_image_files/monit_syncd deleted file mode 100644 index d63346d9ee..0000000000 --- a/platform/broadcom/docker-syncd-brcm/base_image_files/monit_syncd +++ /dev/null @@ -1,11 +0,0 @@ -############################################################################### -## Monit configuration for syncd container -## process list: -## syncd -## dsserve -############################################################################### -check program syncd|syncd with path "/usr/bin/process_checker syncd /usr/bin/syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program syncd|dsserve with path "/usr/bin/process_checker syncd /usr/bin/dsserve /usr/bin/syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/platform/cavium/docker-syncd-cavm.mk b/platform/cavium/docker-syncd-cavm.mk index 059d2c71eb..eeeb312ad4 100644 --- a/platform/cavium/docker-syncd-cavm.mk +++ b/platform/cavium/docker-syncd-cavm.mk @@ -20,4 +20,3 @@ $(DOCKER_SYNCD_CAVM)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_CAVM)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_CAVM)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CAVM)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro -$(DOCKER_SYNCD_CAVM)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/cavium/docker-syncd-cavm/base_image_files/monit_syncd b/platform/cavium/docker-syncd-cavm/base_image_files/monit_syncd deleted file mode 100644 index 61e290e318..0000000000 --- a/platform/cavium/docker-syncd-cavm/base_image_files/monit_syncd +++ /dev/null @@ -1,7 +0,0 @@ -############################################################################### -## Monit configuration for syncd container -## process list: -## syncd -############################################################################### -check program syncd|syncd with path "/usr/bin/process_checker syncd /usr/bin/syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/platform/centec/docker-syncd-centec.mk b/platform/centec/docker-syncd-centec.mk index 75cc45c285..7381046394 100644 --- a/platform/centec/docker-syncd-centec.mk +++ b/platform/centec/docker-syncd-centec.mk @@ -14,4 +14,3 @@ $(DOCKER_SYNCD_CENTEC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd $(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro -$(DOCKER_SYNCD_CENTEC)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/centec/docker-syncd-centec/base_image_files/monit_syncd b/platform/centec/docker-syncd-centec/base_image_files/monit_syncd deleted file mode 100644 index 61e290e318..0000000000 --- a/platform/centec/docker-syncd-centec/base_image_files/monit_syncd +++ /dev/null @@ -1,7 +0,0 @@ -############################################################################### -## Monit configuration for syncd container -## process list: -## syncd -############################################################################### -check program syncd|syncd with path "/usr/bin/process_checker syncd /usr/bin/syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/platform/marvell-arm64/docker-syncd-mrvl.mk b/platform/marvell-arm64/docker-syncd-mrvl.mk index dd01caab68..32b3899e19 100644 --- a/platform/marvell-arm64/docker-syncd-mrvl.mk +++ b/platform/marvell-arm64/docker-syncd-mrvl.mk @@ -14,4 +14,3 @@ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot -$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/marvell-arm64/docker-syncd-mrvl/base_image_files/monit_syncd b/platform/marvell-arm64/docker-syncd-mrvl/base_image_files/monit_syncd deleted file mode 100644 index 61e290e318..0000000000 --- a/platform/marvell-arm64/docker-syncd-mrvl/base_image_files/monit_syncd +++ /dev/null @@ -1,7 +0,0 @@ -############################################################################### -## Monit configuration for syncd container -## process list: -## syncd -############################################################################### -check program syncd|syncd with path "/usr/bin/process_checker syncd /usr/bin/syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/platform/marvell-armhf/docker-syncd-mrvl.mk b/platform/marvell-armhf/docker-syncd-mrvl.mk index 699bd8bd9b..4904ac3af1 100644 --- a/platform/marvell-armhf/docker-syncd-mrvl.mk +++ b/platform/marvell-armhf/docker-syncd-mrvl.mk @@ -11,4 +11,3 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ $(LIBSAIREDIS_DBG) #$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot -$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/marvell-armhf/docker-syncd-mrvl/base_image_files/monit_syncd b/platform/marvell-armhf/docker-syncd-mrvl/base_image_files/monit_syncd deleted file mode 100644 index 61e290e318..0000000000 --- a/platform/marvell-armhf/docker-syncd-mrvl/base_image_files/monit_syncd +++ /dev/null @@ -1,7 +0,0 @@ -############################################################################### -## Monit configuration for syncd container -## process list: -## syncd -############################################################################### -check program syncd|syncd with path "/usr/bin/process_checker syncd /usr/bin/syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/platform/marvell/docker-syncd-mrvl.mk b/platform/marvell/docker-syncd-mrvl.mk index d6d7d032b8..db1b505062 100644 --- a/platform/marvell/docker-syncd-mrvl.mk +++ b/platform/marvell/docker-syncd-mrvl.mk @@ -15,4 +15,3 @@ SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd -$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/marvell/docker-syncd-mrvl/base_image_files/monit_syncd b/platform/marvell/docker-syncd-mrvl/base_image_files/monit_syncd deleted file mode 100644 index 61e290e318..0000000000 --- a/platform/marvell/docker-syncd-mrvl/base_image_files/monit_syncd +++ /dev/null @@ -1,7 +0,0 @@ -############################################################################### -## Monit configuration for syncd container -## process list: -## syncd -############################################################################### -check program syncd|syncd with path "/usr/bin/process_checker syncd /usr/bin/syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/platform/mellanox/docker-syncd-mlnx.mk b/platform/mellanox/docker-syncd-mlnx.mk index 9bdc5a8ad8..3f9e64b985 100644 --- a/platform/mellanox/docker-syncd-mlnx.mk +++ b/platform/mellanox/docker-syncd-mlnx.mk @@ -15,4 +15,3 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(MLNX_SDK_DBG_DEBS) $(MLNX_SAI_DBGSYM) endif $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot -$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/mellanox/docker-syncd-mlnx/base_image_files/monit_syncd b/platform/mellanox/docker-syncd-mlnx/base_image_files/monit_syncd deleted file mode 100644 index 61e290e318..0000000000 --- a/platform/mellanox/docker-syncd-mlnx/base_image_files/monit_syncd +++ /dev/null @@ -1,7 +0,0 @@ -############################################################################### -## Monit configuration for syncd container -## process list: -## syncd -############################################################################### -check program syncd|syncd with path "/usr/bin/process_checker syncd /usr/bin/syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/platform/nephos/docker-syncd-nephos.mk b/platform/nephos/docker-syncd-nephos.mk index 146523ec1c..a546b68606 100644 --- a/platform/nephos/docker-syncd-nephos.mk +++ b/platform/nephos/docker-syncd-nephos.mk @@ -18,4 +18,3 @@ $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += npx_diag:/usr/bin/npx_diag -$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/nephos/docker-syncd-nephos/base_image_files/monit_syncd b/platform/nephos/docker-syncd-nephos/base_image_files/monit_syncd deleted file mode 100644 index d63346d9ee..0000000000 --- a/platform/nephos/docker-syncd-nephos/base_image_files/monit_syncd +++ /dev/null @@ -1,11 +0,0 @@ -############################################################################### -## Monit configuration for syncd container -## process list: -## syncd -## dsserve -############################################################################### -check program syncd|syncd with path "/usr/bin/process_checker syncd /usr/bin/syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles - -check program syncd|dsserve with path "/usr/bin/process_checker syncd /usr/bin/dsserve /usr/bin/syncd" - if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles diff --git a/rules/docker-database.mk b/rules/docker-database.mk index 0a2f46d192..aa19d6f044 100644 --- a/rules/docker-database.mk +++ b/rules/docker-database.mk @@ -23,6 +23,5 @@ $(DOCKER_DATABASE)_RUN_OPT += --privileged -t $(DOCKER_DATABASE)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro $(DOCKER_DATABASE)_BASE_IMAGE_FILES += redis-cli:/usr/bin/redis-cli -$(DOCKER_DATABASE)_BASE_IMAGE_FILES += monit_database:/etc/monit/conf.d $(DOCKER_DATABASE)_FILES += $(SYSCTL_NET_CONFIG) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) $(DOCKER_DATABASE)_FILES += $(UPDATE_CHASSISDB_CONFIG_SCRIPT) diff --git a/rules/docker-fpm-frr.mk b/rules/docker-fpm-frr.mk index e584bf5510..dca3f30ad5 100644 --- a/rules/docker-fpm-frr.mk +++ b/rules/docker-fpm-frr.mk @@ -32,4 +32,3 @@ $(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TSA:/usr/bin/TSA $(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TSB:/usr/bin/TSB $(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TSC:/usr/bin/TSC $(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TS:/usr/bin/TS -$(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += monit_bgp:/etc/monit/conf.d diff --git a/rules/docker-lldp.mk b/rules/docker-lldp.mk index 5cd4fd02a0..446a8cd608 100644 --- a/rules/docker-lldp.mk +++ b/rules/docker-lldp.mk @@ -29,5 +29,4 @@ $(DOCKER_LLDP)_RUN_OPT += -v /usr/share/sonic/scripts:/usr/share/sonic/scripts:r $(DOCKER_LLDP)_BASE_IMAGE_FILES += lldpctl:/usr/bin/lldpctl $(DOCKER_LLDP)_BASE_IMAGE_FILES += lldpcli:/usr/bin/lldpcli -$(DOCKER_LLDP)_BASE_IMAGE_FILES += monit_lldp:/etc/monit/conf.d $(DOCKER_LLDP)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) diff --git a/rules/docker-orchagent.mk b/rules/docker-orchagent.mk index 5e2e08ee24..78cef9fd1a 100644 --- a/rules/docker-orchagent.mk +++ b/rules/docker-orchagent.mk @@ -32,5 +32,4 @@ $(DOCKER_ORCHAGENT)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro $(DOCKER_ORCHAGENT)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw $(DOCKER_ORCHAGENT)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel -$(DOCKER_ORCHAGENT)_BASE_IMAGE_FILES += monit_swss:/etc/monit/conf.d $(DOCKER_ORCHAGENT)_FILES += $(ARP_UPDATE_SCRIPT) $(ARP_UPDATE_VARS_TEMPLATE) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) diff --git a/rules/docker-restapi.mk b/rules/docker-restapi.mk index ef56789dd7..98f43b2395 100644 --- a/rules/docker-restapi.mk +++ b/rules/docker-restapi.mk @@ -24,4 +24,3 @@ $(DOCKER_RESTAPI)_RUN_OPT += -p=8081:8081/tcp $(DOCKER_RESTAPI)_RUN_OPT += -p=8090:8090/tcp $(DOCKER_RESTAPI)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) -$(DOCKER_RESTAPI)_BASE_IMAGE_FILES += monit_restapi:/etc/monit/conf.d diff --git a/rules/docker-sflow.mk b/rules/docker-sflow.mk index 6888304b8b..f9386190a4 100644 --- a/rules/docker-sflow.mk +++ b/rules/docker-sflow.mk @@ -30,5 +30,4 @@ $(DOCKER_SFLOW)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SFLOW)_BASE_IMAGE_FILES += psample:/usr/bin/psample $(DOCKER_SFLOW)_BASE_IMAGE_FILES += sflowtool:/usr/bin/sflowtool -$(DOCKER_SFLOW)_BASE_IMAGE_FILES += monit_sflow:/etc/monit/conf.d $(DOCKER_SFLOW)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) diff --git a/rules/docker-snmp.mk b/rules/docker-snmp.mk index cbc69dc92b..a2e8540ca9 100644 --- a/rules/docker-snmp.mk +++ b/rules/docker-snmp.mk @@ -28,4 +28,3 @@ $(DOCKER_SNMP)_RUN_OPT += --privileged -t $(DOCKER_SNMP)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro $(DOCKER_SNMP)_RUN_OPT += -v /usr/share/sonic/scripts:/usr/share/sonic/scripts:ro $(DOCKER_SNMP)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) -$(DOCKER_SNMP)_BASE_IMAGE_FILES += monit_snmp:/etc/monit/conf.d diff --git a/rules/docker-teamd.mk b/rules/docker-teamd.mk index 5442d5bf6b..c0fe6bfb6b 100644 --- a/rules/docker-teamd.mk +++ b/rules/docker-teamd.mk @@ -27,5 +27,4 @@ $(DOCKER_TEAMD)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro $(DOCKER_TEAMD)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_TEAMD)_BASE_IMAGE_FILES += teamdctl:/usr/bin/teamdctl -$(DOCKER_TEAMD)_BASE_IMAGE_FILES += monit_teamd:/etc/monit/conf.d $(DOCKER_TEAMD)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)