I've some difficult to use the NRPE plugin with nagios for monitor a windows server.
I've use this to install my NagiosCore/NagiosPlugins/NRPE :
Code: Select all
dpkg -l selinux*
apt-get update
apt-get install -y autoconf automake gcc libc6 libmcrypt-dev make libssl-dev wget unzip apache2 apache2-utils php libgd-dev bc gawk dc build-essential snmp libnet-snmp-perl gettext
cd /tmp
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.2.tar.gz
tar xzf nagioscore.tar.gz
cd /tmp/nagioscore-nagios-4.4.2/
./configure --with-httpd-conf=/etc/apache2/sites-enabled
make all
make install-groups-users
usermod -a -G nagios www-data
make install
make install-daemoninit
make install-commandmode
make install-config
make install-webconf
a2enmod rewrite
a2enmod cgi
iptables -I INPUT -p tcp --destination-port 80 -j ACCEPT
iptables -I INPUT -p tcp --destination-port 5666 -j ACCEPT
apt-get install -y iptables-persistent
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
systemctl restart apache2.service
systemctl start nagios.service
cd /tmp
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.2.1.tar.gz
tar zxf nagios-plugins.tar.gz
cd /tmp/nagios-plugins-release-2.2.1/
./tools/setup
./configure
make
make install
cd /tmp
wget --no-check-certificate -O nrpe.tar.gz https://github.com/NagiosEnterprises/nrpe/archive/nrpe-3.2.1.tar.gz
tar xzf nrpe.tar.gz
cd /tmp/nrpe-nrpe-3.2.1/
./configure --enable-command-args --disable-ssl
make all
make install-groups-users
make install
make install-config
echo >> /etc/services
echo '# Nagios services' >> /etc/services
echo 'nrpe 5666/tcp' >> /etc/services
make install-init
systemctl enable nrpe.service
sed -i '/^allowed_hosts=/s/$/,10.205.134.126,10.205.128.95/' /usr/local/nagios/etc/nrpe.cfg
sed -i 's/^dont_blame_nrpe=.*/dont_blame_nrpe=1/g' /usr/local/nagios/etc/nrpe.cfg
systemctl start nrpe.service
On my nagios server, when i run this command :
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
But when i try with my windows server :
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.205.134.126
I've already look a lot of topics but none can help me
You can find my nsclient.ini in attachment.
Thanks for ur help !