diff --git a/sysSentry-1.0.2/service/sentryCollector.service b/sysSentry-1.0.2/service/sentryCollector.service new file mode 100644 index 0000000000000000000000000000000000000000..2e50d7a89a4aee35e2a0c48000681b2d7ba7738e --- /dev/null +++ b/sysSentry-1.0.2/service/sentryCollector.service @@ -0,0 +1,12 @@ +[Unit] +Description = Collection module added for sysSentry and kernel lock-free collection + +[Service] +ExecStart=/usr/bin/sentryCollector +ExecStop=/bin/kill $MAINPID +KillMode=process +Restart=on-failure +RestartSec=10s + +[Install] +WantedBy = multi-user.target diff --git a/sysSentry-1.0.2/src/python/plugins/__init__.py b/sysSentry-1.0.2/src/python/plugins/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/sysSentry-1.0.2/src/python/plugins/avg_block_io/__init__.py b/sysSentry-1.0.2/src/python/plugins/avg_block_io/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/sysSentry-1.0.2/src/python/plugins/avg_block_io/avg_block_io.py b/sysSentry-1.0.2/src/python/plugins/avg_block_io/avg_block_io.py index 7a93500977853bdbbeaabd024b352c54cef8e09f..cfc11423f2997bf3047c44180e51f969cb5d3b7c 100644 --- a/sysSentry-1.0.2/src/python/plugins/avg_block_io/avg_block_io.py +++ b/sysSentry-1.0.2/src/python/plugins/avg_block_io/avg_block_io.py @@ -13,9 +13,9 @@ import signal import configparser import time -from stage_window import IoWindow, IoDumpWindow -from module_conn import avg_is_iocollect_valid, avg_get_io_data, report_alarm_fail, process_report_data -from utils import update_avg_and_check_abnormal +from .stage_window import IoWindow, IoDumpWindow +from .module_conn import avg_is_iocollect_valid, avg_get_io_data, report_alarm_fail, process_report_data +from .utils import update_avg_and_check_abnormal CONFIG_FILE = "/etc/sysSentry/plugins/avg_block_io.ini" diff --git a/sysSentry-1.0.2/src/python/plugins/avg_block_io/module_conn.py b/sysSentry-1.0.2/src/python/plugins/avg_block_io/module_conn.py index e174b5007bbd72cedfea712d8184907b3b869515..5f9ef357ba6c4b95fbde70d29f930e24729db4dd 100644 --- a/sysSentry-1.0.2/src/python/plugins/avg_block_io/module_conn.py +++ b/sysSentry-1.0.2/src/python/plugins/avg_block_io/module_conn.py @@ -13,7 +13,7 @@ import logging import sys import time -from utils import is_abnormal +from .utils import is_abnormal from sentryCollector.collect_plugin import is_iocollect_valid, get_io_data, Result_Messages from syssentry.result import ResultLevel, report_result diff --git a/sysSentry-1.0.2/src/python/setup.py b/sysSentry-1.0.2/src/python/setup.py index 871f26c77907bba07939eed956b08d22543fb66d..369e6fc84bb5124f394a5beaec41bef690cd625c 100644 --- a/sysSentry-1.0.2/src/python/setup.py +++ b/sysSentry-1.0.2/src/python/setup.py @@ -33,7 +33,7 @@ setup( 'syssentry=syssentry.syssentry:main', 'xalarmd=xalarm.xalarm_daemon:alarm_process_create', 'sentryCollector=sentryCollector.collectd:main', - 'avg_block_io=plugins.avg_block_io:main' + 'avg_block_io=plugins.avg_block_io.avg_block_io:main' ] }, )