Zombie process monitor using NCPA
-
IT-OPS-SYS
- Posts: 184
- Joined: Sun Jan 07, 2018 12:56 pm
Re: Zombie process monitor using NCPA
Would it be possible for us to run the script as admin/root user instead of nagios user.
Re: Zombie process monitor using NCPA
Hi,
It is NOT recommended that you use "root" for this.
However, inside the "ncpa.cfg" file (on your NCPA remote agent) which defined user and group to run plugins.
What is the "log_file" path that your file is using?
Best Regards,
Vinh
It is NOT recommended that you use "root" for this.
However, inside the "ncpa.cfg" file (on your NCPA remote agent) which defined user and group to run plugins.
Code: Select all
[listener]
#
# User and group to run plugins as (recommended to use nagios:nagios)
# Default: uid = nagios
# Default: gid = nagios
#
# ** Note - The daemon runs as root, but forks a child process when running a plugin
# that is defined by the user, for security reasons. However, without the main daemon
# running as root, much of the system information would be missing. This is typical behavior. **
#
# This is for Unix only (Linux, Mac OS X, etc)
#
uid = nagios
gid = nagios
Best Regards,
Vinh
-
IT-OPS-SYS
- Posts: 184
- Joined: Sun Jan 07, 2018 12:56 pm
Re: Zombie process monitor using NCPA
i changed the permission but same issue. uploaded both the plugins for you to review.
log_file = /var/log
Permissions are :
ls -l kern.log
-rw-r----- 1 syslog adm 1185 May 13 22:29 kern.log
log_file = /var/log
Permissions are :
ls -l kern.log
-rw-r----- 1 syslog adm 1185 May 13 22:29 kern.log
You do not have the required permissions to view the files attached to this post.
Re: Zombie process monitor using NCPA
Hi,
Hope you are having a good day!!
Please change permission for "log_file":
Now try again:
Best Regards,
Vinh
Hope you are having a good day!!
Please change permission for "log_file":
Code: Select all
sudo chmod 644 /var/log/kern.log
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H 10.0.60.35 -t 'cFvgpWMXjaZojGlk' -P 5693 -M 'plugins/nfs-error.py'
Vinh
-
IT-OPS-SYS
- Posts: 184
- Joined: Sun Jan 07, 2018 12:56 pm
Re: Zombie process monitor using NCPA
it worked. thanks for your assistance.
how about the script do you want me to make any changes to it .
how about the script do you want me to make any changes to it .
Re: Zombie process monitor using NCPA
Hi,
Hope you are having a good day!!
Your python script looks fine.
However, if your "log_file" is large, checking each line for a matching string might not be a good solution especially if your log_file does not rotate each night.
So keep an eye on that log_file, don't let it get too big ...
May I close this thread?
Best Regards,
Vinh
Hope you are having a good day!!
Your python script looks fine.
However, if your "log_file" is large, checking each line for a matching string might not be a good solution especially if your log_file does not rotate each night.
So keep an eye on that log_file, don't let it get too big ...
May I close this thread?
Best Regards,
Vinh
-
IT-OPS-SYS
- Posts: 184
- Joined: Sun Jan 07, 2018 12:56 pm
Re: Zombie process monitor using NCPA
sure. thanks and have a good one!!!
Re: Zombie process monitor using NCPA
Great!! .... locking thread!! ... 