NRPE - How To Uninstall NRPE |
Uninstalling NRPE This document describes how to uninstall NRPE that is installed from source. The installation could have been performed using the linux-nrpe-agent that ships with Nagios XI OR directly from the source files. This KB article does not apply if you have installed NRPE using your operating system (OS) package manager like yum. Warning
The steps in this KB article could lead to unexpected results if you are not familiar with the commands being executed. If you are unsure about the steps being provided it is recommended to seek advice from the Nagios Support Forums before proceeding. Nagios XI
DO NOT follow this procedure on your Nagios XI server! NRPE is a part of Nagios XI and performing the commands in this KB article can result in a broken Nagios XI server.
This guide is broken up into several sections and covers different Linux distributions and non-Linux operating systems. It is assumed that you are logged onto the machine as the root user, or a user with sufficient privileges. Some OS's like Ubuntu and SUSE have stricter user permissions, in those cases the listed commands have sudo in front of them to ensure you are able to complete the steps. A best effort has been made to ensure if you follow all the relevant steps you will completely remove NRPE.
Please select your OS:
Identify NRPE DaemonNRPE can be running as a dedicated service or via the XINETD daemon. You must identify this as the steps to stop and remove the service will be different. To identify if you are using XINETD execute the following command: file /etc/xinetd.d/nrpe
This output indicates that you are using XINETD: /etc/xinetd.d/nrpe: ASCII text Follow the XINETD steps below.
This output indicates that you are NOT using XINETD and hence must be using a dedicated service: /etc/xinetd.d/nrpe: cannot open `/etc/xinetd.d/nrpe' (No such file or directory) Follow the dedicated daemon steps below.
Stop And Remove XINETD DaemonExecute these commands to stop XINETD from running NRPE. Delete the configuration file: rm -f /etc/xinetd.d/nrpe
Restart the XINETD daemon depending on your operating system version: ===== CentOS 5.x / 6x | RHEL 5.x / 6x | Oracle Linux 5.x / 6x ===== service xinetd restart
===== CentOS 7.x | RHEL 7.x | Oracle Linux 7.x ===== systemctl restart xinetd.service
Stop And Remove Dedicated DaemonExecute these commands to stop, disable and remove the NRPE service, depending on your operating system version: ===== CentOS 5.x | RHEL 5.x | Oracle Linux 5.x ===== service nrpe stop
===== CentOS 6.x | RHEL 6.x | Oracle Linux 6.x ===== stop nrpe ===== CentOS 7.x | RHEL 7.x | Oracle Linux 7.x ===== systemctl stop nrpe.service
Delete NRPE FilesThese commands will delete the key NRPE files. The commands do not delete any other files such as Nagios Pluigns. rm -f /usr/local/nagios/bin/nrpe*
Remove User And GroupWarning
If you have other Nagios components installed such as Nagios Core you should NOT execute these commands. These commands will remove the nagios user and group. userdel nagios
This completes uninstalling NRPE.
Identify NRPE DaemonNRPE can be running as a dedicated service or via the XINETD daemon. You must identify this as the steps to stop and remove the service will be different. To identify if you are using XINETD execute the following command: file /etc/xinetd.d/nrpe
This output indicates that you are using XINETD: /etc/xinetd.d/nrpe: ASCII text Follow the XINETD steps below.
This output indicates that you are NOT using XINETD and hence must be using a dedicated service: /etc/xinetd.d/nrpe: cannot open `/etc/xinetd.d/nrpe' (No such file or directory) Follow the dedicated daemon steps below.
Stop And Remove XINETD DaemonExecute these commands to stop XINETD from running NRPE. Delete the configuration file: sudo rm -f /etc/xinetd.d/nrpe
Restart the XINETD daemon depending on your operating system version: ===== Ubuntu 13.x / 14.x ===== sudo service xinetd restart
===== Ubuntu 15.x / 16.x / 17.x ===== sudo systemctl restart xinetd
Stop And Remove Dedicated DaemonExecute these commands to stop, disable and remove the NRPE service, depending on your operating system version:
===== Ubuntu 13.x / 14.x ===== sudo stop nrpe ===== Ubuntu 15.x / 16.x / 17.x ===== sudo systemctl stop nrpe.service
Delete NRPE FilesThese commands will delete the key NRPE files. The commands do not delete any other files such as Nagios Pluigns. sudo rm -f /usr/local/nagios/bin/nrpe*
Remove User And GroupWarning
If you have other Nagios components installed such as Nagios Core you should NOT execute these commands. These commands will remove the nagios user and group. sudo userdel nagios
This completes uninstalling NRPE.
Identify NRPE DaemonNRPE can be running as a dedicated service or via the XINETD daemon. You must identify this as the steps to stop and remove the service will be different. To identify if you are using XINETD execute the following command: file /etc/xinetd.d/nrpe
This output indicates that you are using XINETD: /etc/xinetd.d/nrpe: ASCII text Follow the XINETD steps below.
This output indicates that you are NOT using XINETD and hence must be using a dedicated service: /etc/xinetd.d/nrpe: cannot open `/etc/xinetd.d/nrpe' (No such file or directory) Follow the dedicated daemon steps below.
Stop And Remove XINETD DaemonExecute these commands to stop XINETD from running NRPE. Delete the configuration file: sudo rm -f /etc/xinetd.d/nrpe
Restart the XINETD daemon depending on your operating system version: ===== SUSE SLES 11.x ===== sudo /sbin/service xinetd restart
===== SUSE SLES 12.x | openSUSE ===== sudo systemctl restart xinetd
Stop And Remove Dedicated DaemonExecute these commands to stop, disable and remove the NRPE service, depending on your operating system version: ===== SUSE SLES 11.x ===== sudo /sbin/service nrpe stop ===== SUSE SLES 12.x | openSUSE ===== sudo systemctl stop nrpe.service
Delete NRPE FilesThese commands will delete the key NRPE files. The commands do not delete any other files such as Nagios Pluigns. sudo rm -f /usr/local/nagios/bin/nrpe*
Remove User And GroupWarning
If you have other Nagios components installed such as Nagios Core you should NOT execute these commands. These commands will remove the nagios user and group. ===== SUSE SLES 11.x ===== sudo /usr/sbin/userdel nagios ===== SUSE SLES 12.x | openSUSE ===== sudo userdel nagios
This completes uninstalling NRPE.
All steps on Debian require to run as root. To become root simply run: Debian su
Raspbian sudo -i
All commands from this point onwards will be as root.
Identify NRPE DaemonNRPE can be running as a dedicated service or via the XINETD daemon. You must identify this as the steps to stop and remove the service will be different. To identify if you are using XINETD execute the following command: file /etc/xinetd.d/nrpe
This output indicates that you are using XINETD: /etc/xinetd.d/nrpe: ASCII text Follow the XINETD steps below.
This output indicates that you are NOT using XINETD and hence must be using a dedicated service: /etc/xinetd.d/nrpe: cannot open `/etc/xinetd.d/nrpe' (No such file or directory) Follow the dedicated daemon steps below.
Stop And Remove XINETD DaemonExecute these commands to stop XINETD from running NRPE. Delete the configuration file: rm -f /etc/xinetd.d/nrpe
Restart the XINETD daemon depending on your operating system version: ===== Debian 7.x ===== service xinetd restart
===== Debian 8.x / 9.x ===== systemctl restart xinetd.service
Stop And Remove Dedicated DaemonExecute these commands to stop, disable and remove the NRPE service, depending on your operating system version: ===== Debian 7.x ===== service nrpe stop
===== Debian 8.x / 9.x ===== systemctl stop nrpe.service
Delete NRPE FilesThese commands will delete the key NRPE files. The commands do not delete any other files such as Nagios Pluigns. rm -f /usr/local/nagios/bin/nrpe*
Remove User And GroupWarning
If you have other Nagios components installed such as Nagios Core you should NOT execute these commands. These commands will remove the nagios user and group. userdel nagios
This completes uninstalling NRPE.
Identify NRPE DaemonNRPE can be running as a dedicated service or via the XINETD daemon. You must identify this as the steps to stop and remove the service will be different. To identify if you are using XINETD execute the following command: file /etc/xinetd.d/nrpe
This output indicates that you are using XINETD: /etc/xinetd.d/nrpe: ASCII text Follow the XINETD steps below.
This output indicates that you are NOT using XINETD and hence must be using a dedicated service: /etc/xinetd.d/nrpe: cannot open `/etc/xinetd.d/nrpe' (No such file or directory) Follow the dedicated daemon steps below.
Stop And Remove XINETD DaemonExecute these commands to stop XINETD from running NRPE and restart the XINETD daemon. rm -f /etc/xinetd.d/nrpe
Stop And Remove Dedicated DaemonExecute these commands to stop, disable and remove the NRPE service: systemctl stop nrpe.service
Delete NRPE FilesThese commands will delete the key NRPE files. The commands do not delete any other files such as Nagios Pluigns. rm -f /usr/local/nagios/bin/nrpe*
Remove User And GroupWarning
If you have other Nagios components installed such as Nagios Core you should NOT execute these commands. These commands will remove the nagios user and group. userdel nagios
This completes uninstalling NRPE.
Stop And Remove Dedicated DaemonExecute these commands to stop, disable and remove the NRPE service: systemctl stop nrpe.service
Delete NRPE FilesThese commands will delete the key NRPE files. The commands do not delete any other files such as Nagios Pluigns. rm -f /usr/local/nagios/bin/nrpe*
Remove User And GroupWarning
If you have other Nagios components installed such as Nagios Core you should NOT execute these commands. These commands will remove the nagios user and group. userdel nagios
This completes uninstalling NRPE.
Stop And Remove Dedicated DaemonExecute these commands to stop, disable and remove the NRPE service, depending on your operating system init system: ===== init ===== service nrpe stop
===== systemd ===== systemctl stop nrpe.service
Delete NRPE FilesThese commands will delete the key NRPE files. The commands do not delete any other files such as Nagios Pluigns. rm -f /usr/local/nagios/bin/nrpe*
Remove User And GroupWarning
If you have other Nagios components installed such as Nagios Core you should NOT execute these commands. These commands will remove the nagios user and group. userdel nagios
This completes uninstalling NRPE.
Stop And Remove Dedicated DaemonExecute these commands to stop, disable and remove the NRPE service: service nrpe stop
Delete NRPE FilesThese commands will delete the key NRPE files. The commands do not delete any other files such as Nagios Pluigns. rm -f /usr/local/nagios/bin/nrpe*
Remove User And GroupWarning
If you have other Nagios components installed such as Nagios Core you should NOT execute these commands. These commands will remove the nagios user and group. pw user del nagios
This completes uninstalling NRPE.
Stop And Remove Dedicated DaemonExecute these commands to stop, disable and remove the NRPE service: svcadm disable nrpe
Delete NRPE FilesThese commands will delete the key NRPE files. The commands do not delete any other files such as Nagios Pluigns. rm -f /usr/local/nagios/bin/nrpe*
Remove User And GroupWarning
If you have other Nagios components installed such as Nagios Core you should NOT execute these commands. These commands will remove the nagios user and group. userdel nagios
This completes uninstalling NRPE.
Stop And Remove Dedicated DaemonExecute these commands to stop, disable and remove the NRPE service: sudo launchctl stop org.nagios.nrpe
Delete NRPE FilesThese commands will delete the key NRPE files. The commands do not delete any other files such as Nagios Pluigns. sudo rm -f /usr/local/nagios/bin/nrpe*
Remove User And GroupWarning
If you have other Nagios components installed such as Nagios Core you should NOT execute these commands. These commands will remove the nagios user and group. sudo dscl localhost delete /Local/Default/Users/nagios
This completes uninstalling NRPE.
Final ThoughtsFor any support related questions please visit the Nagios Support Forums at: |
Posted by: tlea - Thu, Aug 10, 2017 at 8:05 PM. This article has been viewed 33375 times. |
Online URL: https://support.nagios.com/kb/article/nrpe-how-to-uninstall-nrpe-741.html |
Powered by PHPKB (Knowledge Base Software)