Automate Linux NRPE installation
Re: Automate Linux NRPE installation
Actually, I tested our Linux agent installer on OpenSUSE 11.4 and on SUSE Linux Enterprise Server 11 (patchlevel 3), and it seemed to work just fine. What is the issue that you are having with installing the Linux agent on SUSE?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Automate Linux NRPE installation
Well, it appears since I have been running Nagios core with SSH when I try to install the NRPE using the installation script for SUSE I get this:
./fullinstall
============================
Nagios Linux Agent Installer
============================
This script will install the Nagios Linux Agent by executing all necessary
sub-scripts.
IMPORTANT: This script should only be used on a clean installed system:
RedHat Enterprise, CentOS, Fedora, or Oracle
OpenSUSE or SUSE Enterprise
Ubuntu or Debian
Do NOT use this on a system running any other distro or that
does not allow additional package installation.
Proceeding with installation...
Running './0-repos'...
Repos already configured - exiting.
RESULT=0
Running './1-prereqs'...
Prereqs already installed - skipping...
RESULT=0
Running './2-usersgroups'...
Adding users and groups...
useradd: Account `nagios' already exists.
groupadd: Group `nagios' already exists.
useradd: Account `nagios' already exists.
groupadd: Group `nagcmd' already exists.
usermod: Unknown group `nagios'.
ERROR: Group 'nagios' was not created - exiting.
RESULT=1
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.
The script that failed was: './2-usersgroups'
I believe this is because the nagios group exists because when I manually try to add the group I get this message:
groupadd nagios
groupadd: Group `nagios' already exists.
./fullinstall
============================
Nagios Linux Agent Installer
============================
This script will install the Nagios Linux Agent by executing all necessary
sub-scripts.
IMPORTANT: This script should only be used on a clean installed system:
RedHat Enterprise, CentOS, Fedora, or Oracle
OpenSUSE or SUSE Enterprise
Ubuntu or Debian
Do NOT use this on a system running any other distro or that
does not allow additional package installation.
Proceeding with installation...
Running './0-repos'...
Repos already configured - exiting.
RESULT=0
Running './1-prereqs'...
Prereqs already installed - skipping...
RESULT=0
Running './2-usersgroups'...
Adding users and groups...
useradd: Account `nagios' already exists.
groupadd: Group `nagios' already exists.
useradd: Account `nagios' already exists.
groupadd: Group `nagcmd' already exists.
usermod: Unknown group `nagios'.
ERROR: Group 'nagios' was not created - exiting.
RESULT=1
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.
The script that failed was: './2-usersgroups'
I believe this is because the nagios group exists because when I manually try to add the group I get this message:
groupadd nagios
groupadd: Group `nagios' already exists.
Re: Automate Linux NRPE installation
If the user "nagios" and group "nagios" already exist, this is not a "clean system":IMPORTANT: This script should only be used on a clean installed system:
This is why the installer bails out.Running './2-usersgroups'...
Adding users and groups...
useradd: Account `nagios' already exists.
groupadd: Group `nagios' already exists.
useradd: Account `nagios' already exists.
groupadd: Group `nagcmd' already exists.
usermod: Unknown group `nagios'.
ERROR: Group 'nagios' was not created - exiting.
RESULT=1
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Automate Linux NRPE installation
Ok. Fair enough. How would one bypass that check?
I've tried to comment out that in the fullinstall but that doesn't appear to work.
I've tried to comment out that in the fullinstall but that doesn't appear to work.
Re: Automate Linux NRPE installation
Could you show us what files are in the install directory. There is files that get "touched" when that step is completed. Don't remember what the naming convention is..
Re: Automate Linux NRPE installation
/tmp/linux-nrpe-agent # ll
total 100
-rw------- 1 root root 2 Mar 27 14:30 .fail-18657
-rw-r--r-- 1 root root 2 Mar 27 14:32 .fail-18826
drwxr-xr-x 6 root root 4096 Feb 23 11:25 .svn
-rwxr-xr-x 1 root root 2053 Jan 19 13:08 0-repos
-rwxr-xr-x 1 root root 2036 Dec 1 15:40 0-repos.orig
-rwxr-xr-x 1 root root 1083 Mar 9 11:10 1-prereqs
-rwxr-xr-x 1 root root 1086 Dec 1 16:15 1-prereqs.orig
-rwxr-xr-x 1 root root 1340 Jan 5 11:00 2-usersgroups
-rwxr-xr-x 1 root root 458 Dec 1 15:14 3-services
-rwxr-xr-x 1 root root 3424 Feb 23 11:23 4-firewall
-rwxr-xr-x 1 root root 679 Dec 1 15:14 A-subcomponents
-rw-r--r-- 1 root root 732 Feb 23 11:23 CHANGES.txt
-rwxr-xr-x 1 root root 4662 Mar 27 11:26 fullinstall
-rwxr-xr-x 1 root root 4580 Jan 5 11:00 fullinstall.orig
-rwxr-xr-x 1 root root 1832 Dec 1 15:14 get-os-info
-rwxr-xr-x 1 root root 1079 Dec 1 15:14 init.sh
-rw------- 1 root root 3430 Mar 27 14:32 install.log
-rw------- 1 root root 0 Mar 27 14:30 installed.prereqs
-rw------- 1 root root 0 Mar 27 14:30 installed.repos
-rw-r--r-- 1 root root 240 Dec 1 15:14 nagios.firewallapps
drwxr-xr-x 3 root root 4096 Dec 1 15:12 packages
drwxr-xr-x 7 root root 4096 Mar 27 14:30 subcomponents
-rw-r--r-- 1 root root 779 Mar 27 14:32 xi-sys.cfg
drwxr-xr-x 3 root root 4096 Dec 1 15:12 xinrpe
-rwxr-xr-x 1 root root 610 Dec 1 15:14 xivar
total 100
-rw------- 1 root root 2 Mar 27 14:30 .fail-18657
-rw-r--r-- 1 root root 2 Mar 27 14:32 .fail-18826
drwxr-xr-x 6 root root 4096 Feb 23 11:25 .svn
-rwxr-xr-x 1 root root 2053 Jan 19 13:08 0-repos
-rwxr-xr-x 1 root root 2036 Dec 1 15:40 0-repos.orig
-rwxr-xr-x 1 root root 1083 Mar 9 11:10 1-prereqs
-rwxr-xr-x 1 root root 1086 Dec 1 16:15 1-prereqs.orig
-rwxr-xr-x 1 root root 1340 Jan 5 11:00 2-usersgroups
-rwxr-xr-x 1 root root 458 Dec 1 15:14 3-services
-rwxr-xr-x 1 root root 3424 Feb 23 11:23 4-firewall
-rwxr-xr-x 1 root root 679 Dec 1 15:14 A-subcomponents
-rw-r--r-- 1 root root 732 Feb 23 11:23 CHANGES.txt
-rwxr-xr-x 1 root root 4662 Mar 27 11:26 fullinstall
-rwxr-xr-x 1 root root 4580 Jan 5 11:00 fullinstall.orig
-rwxr-xr-x 1 root root 1832 Dec 1 15:14 get-os-info
-rwxr-xr-x 1 root root 1079 Dec 1 15:14 init.sh
-rw------- 1 root root 3430 Mar 27 14:32 install.log
-rw------- 1 root root 0 Mar 27 14:30 installed.prereqs
-rw------- 1 root root 0 Mar 27 14:30 installed.repos
-rw-r--r-- 1 root root 240 Dec 1 15:14 nagios.firewallapps
drwxr-xr-x 3 root root 4096 Dec 1 15:12 packages
drwxr-xr-x 7 root root 4096 Mar 27 14:30 subcomponents
-rw-r--r-- 1 root root 779 Mar 27 14:32 xi-sys.cfg
drwxr-xr-x 3 root root 4096 Dec 1 15:12 xinrpe
-rwxr-xr-x 1 root root 610 Dec 1 15:14 xivar
Re: Automate Linux NRPE installation
Great lead too.
I touched installed.usersgroups in /tmp/linux-nrpe-agent and things look promising.
I touched installed.usersgroups in /tmp/linux-nrpe-agent and things look promising.
Re: Automate Linux NRPE installation
Beat me to the punch. The last statement in 2-usersgroups was touch installed.usersgroups. Awesome. I will keep this thread open. Keep us posted.
Re: Automate Linux NRPE installation
Rats! Now it is the A-subcomponents and I can't just touch that file as the script then does nothing.
Do NOT use this on a system running any other distro or that
does not allow additional package installation.
Proceeding with installation...
Running './0-repos'...
Repos already configured - exiting.
RESULT=0
Running './1-prereqs'...
Prereqs already installed - skipping...
RESULT=0
Running './2-usersgroups'...
Users/groups already configured - skipping.
RESULT=0
Running './3-services'...
/etc/services already updated - skipping.
RESULT=0
Running './4-firewall'...
Firewall rules already configured - skipping.
RESULT=0
Running './A-subcomponents'...
chown: invalid user: `nagios:nagios'
RESULT=1
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.
The script that failed was: './A-subcomponents'
Do NOT use this on a system running any other distro or that
does not allow additional package installation.
Proceeding with installation...
Running './0-repos'...
Repos already configured - exiting.
RESULT=0
Running './1-prereqs'...
Prereqs already installed - skipping...
RESULT=0
Running './2-usersgroups'...
Users/groups already configured - skipping.
RESULT=0
Running './3-services'...
/etc/services already updated - skipping.
RESULT=0
Running './4-firewall'...
Firewall rules already configured - skipping.
RESULT=0
Running './A-subcomponents'...
chown: invalid user: `nagios:nagios'
RESULT=1
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.
The script that failed was: './A-subcomponents'
Re: Automate Linux NRPE installation
I am coming from a Red Hat perspective, so this may not apply.
Unless you are tied to a specific package manager installation (i.e. RPM), there is absolutely reason why you can't tar up all of the files on server that is fully configured, ship the archive to the target server, untar it, and bounce inetd.
I can't think of any reason why that would not work unless you've no way to copy the file to the server or execute remote commands on a large number of those servers.
This does require one fully operational "prototype" for each type of target server.
For what it's worth, this method can be used on virtually any UNIX platform assuming you DO NOT care about the native package manager (rpm, swinstall, pkgadd, etc.) knowing about it. If you want a formal install, then you will either need to build a package or replicate the changes the native package manager makes (which is possible in some cases).
I know for a fact this process works.
Good luck.
Unless you are tied to a specific package manager installation (i.e. RPM), there is absolutely reason why you can't tar up all of the files on server that is fully configured, ship the archive to the target server, untar it, and bounce inetd.
I can't think of any reason why that would not work unless you've no way to copy the file to the server or execute remote commands on a large number of those servers.
This does require one fully operational "prototype" for each type of target server.
For what it's worth, this method can be used on virtually any UNIX platform assuming you DO NOT care about the native package manager (rpm, swinstall, pkgadd, etc.) knowing about it. If you want a formal install, then you will either need to build a package or replicate the changes the native package manager makes (which is possible in some cases).
I know for a fact this process works.
Good luck.