Vous êtes sur la page 1sur 4

HowTo setup Nagwin

 Server setup

Download the Nagwin server from Sourceforge:


http://sourceforge.net/projects/sereds/files/Nagios/nagwin/1.0.1/Nagwin_1.0.1_Installer.
zip/download

Unpack and run setup on your Windows server ( WindowsXP will work just fine )

Make an exception in the firewall for TCP port 80 ( if running server with a firewall )

On the NagWin server, open the file C:\Program


Files\ICW\etc\nagios\nagwin\commands.cfg

Add these lines:

# 'check_nrpe' command definition


define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}

Restart the NagWin server

Now you should see your local server when browsing to http://localhost on your NagWin
server and clicking on Hosts

 Client setup

Download the NRPE client (winrpe_3.0.2_Installer.exe.zip) from


http://sourceforge.net/projects/sereds/files/Nagios/winrpe/3.0.2/

Install the NRPE client on the server you want to monitor.

On the client, open the file C:\Program Files\ICW\nrpe.cfg

Delete all content in that file and replace with:

server_port=5666
nrpe_user=SvcNrpe
nrpe_group=SvcNrpe
allowed_hosts=ip-address of your NagWin server
command_timeout=60
connection_timeout=300
command[pdm_disk_c]=check_pdm.exe --disk --drive C: -w 90 -c 95
command[pdm_cpuload]=check_pdm.exe --processor -w 50 -c 80
command[pdm_memory_physical]=check_pdm.exe --memory physical -w 95 -c 99
command[pdm_memory_virtual]=check_pdm.exe --memory virtual -w 95 -c 99
command[pdm_memory_pagefile]=check_pdm.exe --memory pagefile -w 95 -c 99

Change "ip-address of your NagWin server" to the IP address of your NagWin server.

Start the nrpe service manually, also set it to start automatically in the future.

Open the firewall for TCP connections on port 5666 ( if running a server with a firewall )

If the service fail to start ! :

Open a command prompt and run the following commands:

"C:\Program Files\ICW\bin\mkpasswd" -l > "C:\Program Files\icw\etc\"passwd

and

"C:\Program Files\ICW\bin\mkgroup" -l > "C:\Program Files\icw\etc\"group

Try starting the service again.

__________________________________________________________________

On the Nagwin server, create a file with the same name as the server you wish to
monitor.

For instance testserver.cfg and place it in the C:\Program Files\ICW\etc\nagios\nagwin


directory

The testserver.cfg should have the following content:

# Define a host for the local machine


define host{
use windows-server
host_name test1
alias test1
address ip.ad.dre.ss
}

define service{
use generic-service
host_name test1
service_description Disk C
check_command check_nrpe!pdm_disk_c
}
define service{
use generic-service
host_name test1
service_description CPU load
check_command check_nrpe!pdm_cpuload
}

define service{
use generic-service
host_name test1
service_description Memory physical
check_command check_nrpe!pdm_memory_physical
}

define service{
use generic-service
host_name test1
service_description Memory virtual
check_command check_nrpe!pdm_memory_virtual
}

define service{
use generic-service
host_name test1
service_description Memory pagefile
check_command check_nrpe!pdm_memory_pagefile
}

Replace Host_Name and Alias with your servername ( testserver )

Replace ip.ad.dre.ss with the IPaddress of your monitored server.

Restart NagWin server.

Surf to http://localhost on your NagWin server and your testserver should be there.

You will get some red errors when you check under services. But thats for another
Howto guide.

Fri, 11/03/2011 - 16:45


#1
tk
Offline
Joined: 01.05.2008
Posts:
Thanks for your contribution

Thanks for your contribution !!

Top
 Login or register to post comments

Wed, 16/03/2011 - 18:05


#2
zxcasd
Offline
Joined: 16.03.2011
Posts:
minor fix to client-service-doesn't-start instructions

This won't work: 

bin\bash -c /bin/mkpasswd -l > /etc/passwd

and

bin\bash -c /bin/mkgroup -l > /etc/group

---

You need to change the directories to relative references since you've already switched
to the ICW directory which is the "root" of those folders. Use this instead:

bin\bash -c bin/mkpasswd -l > etc/passwd

bin\bash -c bin/mkgroup -l > etc/group

Otherwise, thanks SO much for these instructions - I was up and running in 5 minutes. 

Vous aimerez peut-être aussi