Hi has anyone installed the nrpe-agent via command line with parameters to configure the IP addresses for monitoring servers?
Instead of extracting the tar file manipulating a file, I would like to one line install.
IE: ./fullinstall -non-interactive $PAR=10.2.2.2
etc.
Looking for an easier way to install these agents on a large amount of servers.
nrpe-agent non-interactive parameters
Re: nrpe-agent non-interactive parameters
Seems this should work for you:
https://github.com/shawnsustaita/deploy_nagios_nrpe
..and you can use this variable to set the IPs of your Nagios servers:
'NAGIOS_IP - This variable is appended to the only_from directive in /etc/xinetd.d/nrpe. This variable is required.'
Beyond that, the options for mass deploying NRPE are puppet
https://forge.puppet.com/tags/nrpe
or
chef
https://supermarket.chef.io/cookbooks/n ... ions/1.0.0
https://github.com/shawnsustaita/deploy_nagios_nrpe
..and you can use this variable to set the IPs of your Nagios servers:
'NAGIOS_IP - This variable is appended to the only_from directive in /etc/xinetd.d/nrpe. This variable is required.'
Beyond that, the options for mass deploying NRPE are puppet
https://forge.puppet.com/tags/nrpe
or
chef
https://supermarket.chef.io/cookbooks/n ... ions/1.0.0
Be sure to check out the Knowledgebase for helpful articles and solutions!
Re: nrpe-agent non-interactive parameters
In addition to what @bwallace mentioned, you should be able to follow a post written a few years back -
https://support.nagios.com/forum/viewto ... 947#p51081
https://support.nagios.com/forum/viewto ... 947#p51081
I just tested it on a CentOS machine, and it worked fine still. All we're doing is hardcoding the allow_from IP, rather then making it a user input.This works:
1. unzip linux-nrpe-agent.tar.gz
2. Modify the following script:
/tmp/linux-nrpe-agent/subcomponents/install
Comment out the read & hard code the IP for your Nagios server:
#read -p "Allow from: " ALLOW_INPUT
ALLOW_INPUT="X.X.X.X"
3. ./fullinstall -n
Former Nagios Employee