Lab 15
Lab 2: Configuring Nagios on Linux Server and Adding Windows Client¶
1. Setup Windows Client VM¶
- Download Windows Server 2019/2022 Evaluation ISO (from Microsoft).
- In VirtualBox → New → Name: WindowsClient → Type: Windows (64-bit).
- Assign: 4096 MB RAM, 40 GB disk.
- Install Windows → create admin account
student. - Enable Remote Desktop for convenience.
2. Install NSClient++¶
- Download from NSClient++ website.
-
Install with options:
- Enable NRPE Server.
- Enable CheckHelpers.
-
Edit config file:
- Allow Nagios server IP under
allowed hosts. - Enable NRPE.
- Allow Nagios server IP under
3. Verify NRPE¶
- From Nagios server:
/usr/lib/nagios/plugins/check_nrpe -H <windows-client-ip>
4. Add Windows Client to Nagios¶
sudo nano /etc/nagios4/conf.d/windowsclient.cfg
Example config:
define host {
use windows-server
host_name windows-client
address <windows-client-ip>
check_period 24x7
max_check_attempts 5
notification_interval 30
notification_period 24x7
}
Restart Nagios and check web UI.
1. Launch Windows Server EC2¶
- AWS Console → EC2 → Launch Instance.
- AMI: Microsoft Windows Server 2019 Base.
- Instance type:
t2.micro(not free tier, may incur cost). - Security Group: Allow RDP (3389) from your IP, and allow Nagios server IP on NRPE port.
- Download password → Decrypt with
.pemkey → RDP into server.
2. Install NSClient++¶
(Same as VirtualBox instructions).
3. Configure Nagios Server¶
(Same host config as above).
✅ Check Windows client appears in Nagios web UI.