-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[201911][Monit] Unmonitor processes in disabled containers #5462
Merged
jleveque
merged 13 commits into
sonic-net:201911
from
yozhao101:unmonitor_processes_disabled_containers
Sep 25, 2020
Merged
[201911][Monit] Unmonitor processes in disabled containers #5462
jleveque
merged 13 commits into
sonic-net:201911
from
yozhao101:unmonitor_processes_disabled_containers
Sep 25, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit ad64dc6) Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit b1cb0ba) Signed-off-by: Yong Zhao <[email protected]>
files. Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit 55237ee) Signed-off-by: Yong Zhao <[email protected]>
host under /etc/monit/conf.d in docker-teamd.mk. Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit a671f45) Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit 9ecb61d) Signed-off-by: Yong Zhao <[email protected]>
…to match the syncd process. Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit e4c0824) Signed-off-by: Yong Zhao <[email protected]>
process_checker. Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit fe167c4) Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit b576e19) Signed-off-by: Yong Zhao <[email protected]>
instead of process name in syslog. Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit b0c86e8) Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit 1a4e481) Signed-off-by: Yong Zhao <[email protected]>
process_checker. Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit 875a2a5) Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]> (cherry picked from commit 4fd77cc) Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]>
jleveque
approved these changes
Sep 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- Why I did it
We want to let Monit to unmonitor the processes in containers which are disabled in FEATURE table such that
Monit will not generate false alerting messages into the syslog.
- How I did it
Monit will periodically run a script which accepts three parameters: <container_name>, <process_name> and
<process_cmdline>. This script will first check whether the container is disabled in the FEATURE table or not.
If it is disabled, Monit will skip monitoring the processes. Otherwise, this script will leverage psutil library to inspect
the process tree in host to look for the processes. If the process is not found, then an alerting message will be written
into syslog.
- How to verify it
We can change the state field of a container in FEATURE table from enabled to disabled and then kill a critical
process in it to see whether Monit can generate the alerting message in syslog or not. The message format in syslog is:
<process_name> is not running.
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)