Page 1 of 1

Automated installation of NRPE

Posted: Fri Apr 06, 2018 8:10 am
by JonWalter
Hello,

Did someone ever manage to install the Linux NRPE agent fully automated? I tried to create a Bash script which use the fullinstall with the n option, but it still stops when asking for the allowed from ip addresses.

This is the script I'm using now:

CODE: SELECT ALL
WriteLog Verbose Info "- NRPE - cd /tmp"
cd /tmp
wget https://assets.nagios.com/downloads/nag ... ent.tar.gz
tar xzf linux-nrpe-agent.tar.gz
cd linux-nrpe-agent
./fullinstall -n


It hangs on:

CODE: SELECT ALL
################################################################################
### ###
### NRPE is currently set to allow connections only from these IP addresses: ###
### ###
### 127.0.0.1 ###
### ###
### If you would like to change this list, enter all IP addresses to allow, ###
### separated by spaces only, and then press Enter. ###
### (Put the address(es) of your Nagios XI servers(s) here.) ###
### ###
################################################################################

Allow from:


Any feedback to make this fully automated is welcome. :)

Imho there should be a switch which allows to starts the script with the allowed from ip addresses. For example

./fullinstall -n -allowed "1.1.1.1 3.3.3.3 5.5.5.5"

Re: Automated installation of NRPE

Posted: Fri Apr 06, 2018 10:01 am
by scottwilkerson
I didn't know that this was being looked for....

Here you go

Code: Select all

#!/bin/bash
cd /tmp
wget https://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz
tar xzf linux-nrpe-agent.tar.gz
cd linux-nrpe-agent
echo "1.1.1.1 3.3.3.3 5.5.5.5"|./fullinstall -n

Re: Automated installation of NRPE

Posted: Tue Apr 10, 2018 5:34 am
by punkoivan
We are using ansible for this purpose and it works great. try to use it for this purpose.

Re: Automated installation of NRPE

Posted: Tue Apr 10, 2018 8:12 am
by scottwilkerson
May we close the thread or did you have any other related questions?