Automated installation of NRPE

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
JonWalter
Posts: 1
Joined: Fri Apr 06, 2018 5:23 am

Automated installation of NRPE

Post 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"
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Automated installation of NRPE

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
punkoivan
Posts: 6
Joined: Thu Sep 15, 2016 7:13 am

Re: Automated installation of NRPE

Post by punkoivan »

We are using ansible for this purpose and it works great. try to use it for this purpose.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Automated installation of NRPE

Post by scottwilkerson »

May we close the thread or did you have any other related questions?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked