Page 1 of 1

nagios group needed?

Posted: Wed Aug 29, 2018 1:25 pm
by jenglish
Hello,

I am trying to Puppetize (if that's a word) our NRPE configurations. I notice that the nagios user/group is created along with the nrpe user/group. Is it necessary for clients that Nagios is monitoring to have the nagios user/group created? I'm just trying to see if I need to bother with having both nrpe and nagios user together on the same server.

Code: Select all

(PRO-BOY|jenglish@boy-adams2 manifests)$ sudo grep 'nrpe\|nagios' /etc/{passwd,shadow,group}
(PRO-BOY|jenglish@boy-adams2 manifests)$ sudo puppet apply master.pp
[snip]
(PRO-BOY|jenglish@boy-adams2 manifests)$ sudo grep 'nrpe\|nagios' /etc/{passwd,shadow,group}
/etc/passwd:nrpe:x:393:299:NRPE user for the NRPE service:/var/run/nrpe:/sbin/nologin
/etc/shadow:nrpe:!!:17771::::::
/etc/group:nrpe:x:299:nrpe
/etc/group:nagios:x:292:nrpe
packages installed:

Code: Select all

(PRO-BOY|jenglish@boy-adams2 manifests)$ sudo yum list installed | grep 'nagios\|nrpe' | awk '{print $1,$2}'
nagios-common.x86_64 4.3.4-5.el7
nagios-plugins.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-all.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-breeze.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-by_ssh.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-cluster.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-dhcp.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-dig.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-disk.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-disk_smb.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-dns.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-dummy.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-file_age.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-flexlm.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-fping.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-game.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-hpjd.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-http.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-icmp.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-ide_smart.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-ircd.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-ldap.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-load.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-log.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-mailq.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-mrtg.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-mrtgtraf.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-mysql.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-nagios.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-nrpe.x86_64 3.2.0-6.el7
nagios-plugins-nt.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-ntp.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-ntp-perl.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-nwstat.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-oracle.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-overcr.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-perl.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-pgsql.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-ping.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-procs.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-real.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-rpc.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-sensors.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-smtp.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-snmp.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-ssh.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-swap.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-tcp.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-time.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-ups.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-uptime.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-users.x86_64 2.2.1-9git5c7eb5b9.el7
nagios-plugins-wave.x86_64 2.2.1-9git5c7eb5b9.el7
nrpe.x86_64 3.2.0-6.el7

Re: nagios group needed?

Posted: Wed Aug 29, 2018 1:45 pm
by npolovenko
Hello, @jenglish. Usually, nrpe agent on the clients side runs under the nagios user. Take a look at the /usr/local/nagios/etc/nrpe.cfg file:
# NRPE USER
# This determines the effective user that the NRPE daemon should run as.
# You can either supply a username or a UID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

nrpe_user=nagios
So yes, you'd need to add the nagios user and group.

Re: nagios group needed?

Posted: Tue Sep 04, 2018 8:19 am
by jenglish
Okay. I will leave those then. Based on some systemd issues I had with user + sudoers file, I had come to believe that nrpe user was the only user.

Thank you. This has resolved my question. Please lock thread.

Re: nagios group needed?

Posted: Tue Sep 04, 2018 9:05 am
by scottwilkerson
jenglish wrote:Okay. I will leave those then. Based on some systemd issues I had with user + sudoers file, I had come to believe that nrpe user was the only user.

Thank you. This has resolved my question. Please lock thread.
Locking