NCPA Passive Service Check on RHEL6
Posted: Wed Jan 23, 2019 11:39 am
G 'Day Nagios Support,
I am trying to determine how to handle a situation on RHEL6 servers where the nagios user does not have permissions to determine Status for certain services. So I have a question about the underlying process being utilized to determine service status on RedHat 6.
Does the NCPA passive agent execute the standard /sbin/service command to determine status?
If so, then it makes sense I could establish a monitoring standard as follows. Please let me know if you see anything obvious or concerning that I am not thinking about.
sudoers entry:
nagios ALL=NOPASSWD:/sbin/service * status <-- allows only for status check, no start/stop/restart
nagios alias entry:
alias service='sudo /sbin/service' <-- adds the sudo call in front of service command
command being issued by ncpa_passive: ??? <-- this is what I am unsure about if this is the actual command being issued by NCPA
service <svc_name> status
If the command is indeed correct then my alias and sudo entries should work...
The reason I am requesting this information is to make sure I have a clear understanding when I make my policy request for the specific sudoers entry from Security and Unix support. This is not an issue on RHEL7 as systemd seems to allow a non-root user to query service status on all services.
Please let me know and as always thanks for your help, input and suggestions,
Danny
p.s. If anyone else has any suggestion or comment please chime in and thanks in advance for your help...Danny
I am trying to determine how to handle a situation on RHEL6 servers where the nagios user does not have permissions to determine Status for certain services. So I have a question about the underlying process being utilized to determine service status on RedHat 6.
Does the NCPA passive agent execute the standard /sbin/service command to determine status?
If so, then it makes sense I could establish a monitoring standard as follows. Please let me know if you see anything obvious or concerning that I am not thinking about.
sudoers entry:
nagios ALL=NOPASSWD:/sbin/service * status <-- allows only for status check, no start/stop/restart
nagios alias entry:
alias service='sudo /sbin/service' <-- adds the sudo call in front of service command
command being issued by ncpa_passive: ??? <-- this is what I am unsure about if this is the actual command being issued by NCPA
service <svc_name> status
If the command is indeed correct then my alias and sudo entries should work...
The reason I am requesting this information is to make sure I have a clear understanding when I make my policy request for the specific sudoers entry from Security and Unix support. This is not an issue on RHEL7 as systemd seems to allow a non-root user to query service status on all services.
Please let me know and as always thanks for your help, input and suggestions,
Danny
p.s. If anyone else has any suggestion or comment please chime in and thanks in advance for your help...Danny