메뉴 건너뛰기

XEDITION

MaraSong :: 정보와 기술 IT

Installing Nagios Agent (NRPE) on CentOS 7

 CloudwaferHQ - July 13, 2018

 

After installing Nagios on our server, the next step is to install the Nagios agent. " Nagios Remote Plugin Executor". With NRPE, Nagios Administrators can use NRPE to monitor Linux servers as it allows you to remotely execute plugins/commands on our Linux machines and get the result back of the executed command.

In this guide, we will install NRPE on our CentOS 7 in order for it to be monitored through a Nagios server.

 

Deploying your cloud server
If you have not already registered with Cloudwafer, you should begin by getting signed up. Take a moment to create an account after which you can easily deploy your own cloud servers.

Once you have signed up, log into your Cloudwafer Client Area with the password provided in your mail and deploy your Cloudwafer cloud server.

 

Step 1: Install EPEL Repository
The NRPE packages and plugins which will be installed are available under the EPEL yum repository, Enable EPEL repository using one of the below commands.

rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
 

 

 

Step 2: Install NRPE and NRPE-plugins
Type the commands below to enable the EPEL repository followed by the command below to install NRPE and its plugins.

yum --enablerepo=epel -y install nrpe nagios-plugins

yum install -y nrpe nagios-plugins-all
 

 

Step 3: Configure NRPE Add-on

Next, we need to modify the NRPE configuration file to accept connection from the Nagios server by editing the /etc/nagios/nrpe.cfg file.

nano /etc/nagios/nrpe.cfg
 

 

Add the Nagios servers IP address, separated by comma like below.

allowed_hosts=127.0.0.1,192.168.1.1
 

 

Step 4: Configure Nagios Checks
There are some basic attributes and services to monitor on a Linux server which includes the CPU, Memory, Disk, HTTP, FTP, etc. The /etc/nagios/nrpe.cfg file contains the basic commands to check these attributes and services on remote hosts.

Listed below are some command lines that lets you monitor attributes with the help of Nagios plugins.

Note: The path to Nagios plugins may change depends on your operating system architecture (i386 or x86_64)

command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_root]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/centos-root
command[check_swap]=/usr/lib64/nagios/plugins/check_swap -w 20% -c 10%
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200
 

 

Note: In the above command definition -w stands for warning and -c stands for critical.

 

Step 5: Restart NRPE
After entering the commands, restart the NRPE service:

systemctl start nrpe
systemctl enable nrpe
 

 

 

Step 6 – Test NRPE from Nagios Server
Lastly, login to the Nagios server and execute the following command to verify that Nagios server is able to connect to clients NRPE services.

check_nrpe -H 196.168.1.2
 

 

If the connection is successful, it will show a version of clients NRPE package.

번호 제목 글쓴이 날짜 조회 수
32 [클럽하우스] 피씨에서 듣기 MaraSong 2021.02.21 85491
31 네트워크 - 와이어샤크 WireShark 유용한 필터식 [3] MaraSong 2019.01.28 32311
30 Mara Copy - Web Page Text Copy (Chrome Extenstion) [14] MaraSong 2020.04.17 14549
29 SpeedTest - 인터넷 속도 측정 사이트. 网速检查。インターネット速度測定. file MaraSong 2019.02.05 4952
28 MaraOCR - 웹페이지에서 영역을 지정하여 텍스트를 추출하고 이를 번역해주는 크롬 확장 프로그램 [3] MaraSong 2020.04.17 3095
27 MaraOCR 웹페이지 추천 MaraSong 2020.04.04 2180
26 [크롬/웨일 확장프로그램 추천] MaraOCR - 웹페이지 텍스트 추출 MaraSong 2020.04.21 2029
25 Mara Copy - 웹페이지에서 텍스트만 뽑아내서 텍스트를 복사할 수 있도록 만든 크롬 확장 프로그램. file MaraSong 2019.01.23 1555
24 MaraOCR - 웹페이지에서 영역을 지정하여 텍스트를 추출하고 이를 번역해주는 웨일 확장 프로그램 MaraSong 2020.04.14 1476
23 @MaraOCRbot 이미지에서 텍스트를 추출하고 한국어로 번역해주는 텔레그램 봇 소개 MaraSong 2019.08.13 1340
22 @MaraOCRbot 이미지에서 텍스트를 추출하고 한국어로 번역해주는 텔레그램 봇 소개 MaraSong 2019.08.07 1229
21 android emulator 안드로이드 애뮬레이터 MaraSong 2016.05.28 1168
20 중국에서 연결 잘되는 네임서버 - China DNS MaraSong 2016.05.23 1163
19 @MaraOCRbot 이미지에서 텍스트를 추출하고 한국어로 번역해주는 텔레그램 봇 소개 file MaraSong 2019.02.04 1138
18 세이프캐스트 SafeCast 방사능 지도 - 일본어 사이트 file MaraSong 2019.02.24 1058
17 광고없는 인스타그램 이미지/사진/동영상 저장 사이트 MaraSong 2020.04.26 1029
16 깃강좌 추천 - 백로그 빽로그 https://backlog.com/git-tutorial/kr MaraSong 2019.04.23 934
15 @MaraTTSBot - 사진에서 한글을 추출하고, 글자를 읽어주는 텔레그램 봇 소개. file MaraSong 2019.03.26 915
14 [쿠팡] 아이패드 프로 - 사전예약 (아직 준비중) MaraSong 2021.05.12 883
13 인터넷 불법 정보, 과연 차단할 수 있을까 - KT 음란물 차단을 바라보며. MaraSong 2019.02.13 846





* 쿠팡 파트너스 활동을 통해 일정액의 수수료를 제공받을 수 있습니다.

위로