- Open a DOS command prompt
- Change working directory to the Nagwin installation directory\bin
- Run the following command to update the password:
htpasswd2 -b /etc/lighttpd/htpasswd nagiosadmin new-password
Nagwin is a Nagios® Core implementation for Windows systems. It is a packaging of Nagios Core and many other related tools to make it a complete and ready-to-use solution for system monitoring. You can use Nagwin to monitor your IT-infrastructure Nagios-way from Windows.
Nagios ® Core is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes. Nagios® Core monitors your entire IT infrastructure to ensure systems, applications, services, and business processes are functioning properly. In the event of a failure, Nagios® Core can alert technical staff of the problem, allowing them to begin remediation processes before outages affect business processes, end-users, or customers. Cygwin is a Linux-like environment for Windows. It consists of a DLL (cygwin1.dll), which emulates substantial Linux API functionality, and a collection of tools. Following tools are also a part of Nagwin: Lighttpd, Php, Net-SNMPand Blat.
Supported platforms : Vista/2008(R2)/7/8/2012(R2)/10/2016/2019/11/2022
Nagwin comes as a ZIP file containing an installer. Simply unzip your downloaded copy and run the package :
- Accept License agreement.
- (Product edition only) Enter your license key
- Specify an installation location.
- Installation starts to copy files and set up services.
- Enter a password for the nagiosadmin user.
At the end of the installation, it will be possible to start the services and the web interface.
Nagwin installation creates following directory structure:
Path | Comments |
---|---|
/bin |
All programs - nagios, nagiosstats, nagios cgis, nginx, php-cgi, fastcgi-wrapper, a set of basic tools and Cygwin DLLs |
/etc/nagios | Nagios configuration files (cgi.cfg, nagios.cfg ....) |
/etc/nagios/nagwin |
All files in this directory are read automatically by Nagios (defined in nagios.cfg) |
/etc/php | php.ini |
/plugins | Nagios plugins |
/var/html | Nagios web directory |
/var/log | Daemon logfiles for stdout/stderr |
/var/opt/nagios | Nagios working directory, log files, performance files ... |
/var/opt/lighttpd | Lighttpd extension libraries |
/var/opt/net-snmp | Net-SNMP working directory |
Nagwin contains standard Nagios Core and should be able to monitor any device as long as you have monitoring plugins for it. Nagwin has already a small set of plugins ready to use in the /plugins directory, and there are a large number of plugins available at Nagios Exchange. However, due to Nagwin's limited environment and Windows, there may be a limited support. You need to try and find out yourself.
By default, Nagwin is configured to monitor your local machine. See following pages for some basic examples. Nagios configuration files are located at etc\nagios directory. Main configuration file nagios.cfg is configured to accept all configuration files in the subdirectory nagwin. Consult available Nagios documentation to move forward and extend your implementation. Nagwin FAQs available here can also help.
For notification purposes, you can use blat, which is installed as a part of the package (see Nagios.cfg for examples).
htpasswd2 -b /etc/lighttpd/htpasswd nagiosadmin new-password
Nagwin has blat smtp mailer included. The first step is to let blat save your smtp server settings for later use:
bin/blat -SaveSettings -f from-address -server your.smtp.server -u login -pw password
define contact{ |
# 'notify-host-by-email' command definition # 'notify-service-by-email' command definition |
Replace smtp.server by name/ip of your smtp server (your Exchange server for example). Make sure that your smtp server is configured to accept smtp requests from Nagwin machine.
You can issue the command below to test if your mail notification works:
echo "Test message" | bin\blat - -to mail@address -f from@address -subject "Test mail" -server smtp.server
As you use Nagwin to monitor other hosts, you may wonder how the Nagwin itself can be monitored. This can be achieved by checking status.dat file age and existence of key processes. Here is a recipe to establish an out-of-band monitoring of Nagwin:
#!/bin/bash
# customize - start
from=from@email.address
server=smtp.server
# customize - end
instroot=$(cygpath -m /)
logdir=/var/log/check_nagwin
mkdir -p $logdir
logfile=$logdir/$(date +"%d").log
echo "***" `date` >> $logfile
# Function to report failure, message body as argument
CheckFail ()
{
printf "$1" | /bin/blat - -to $to -f $from -subject "Nagwin is not operational" -server $server >> $logfile
exit 1
}
# Function to check a process, process name and expected number of instances as arguments
CheckProcess ()
{
/plugins/check_winprocess --filter "imagename eq $1.exe" --compare lt --critical $2 >> $logfile
if (($? > 0)); then
CheckFail "Must be at least $2 $1 process(es) running."
fi
}
# check status.dat age
/plugins/check_winfile --target "$instroot/var/opt/nagios/status.dat" --filter "age lt -15 minutes" --critical 1 --compare eq >> $logfile
if (($? > 0)); then
CheckFail "Nagios status.dat getting old."
fi
# check processes CheckProcess nagios 4
CheckProcess lighttpd 1
printf "\n" >> $logfile
|
You need to customize mail configuration (red) according to your setup. The script above checks if status.dat is updated within the last 15 minutes and if key processes are running with an expected number of intances. It will send an e-mail if any of the criteria are not met. Results from checks will be logged in /var/log/check_nagwin directory in a rotating manner for days of a month.
schtasks /create /sc minute /mo 15 /tn check-nagwin /tr "nagwin-inst-dir\bin\bash.exe -c /bin/check_nagwin.sh"
This command will create the scheduled task check-nagwin running the script above each 15 minutes.
Nagwin 5.4.0release date: Mon, 12/18/2023
2023 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 5.3.2release date: Fri, 09/08/2023
2023 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 5.3.1release date: Thu, 07/06/2023
2023 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 5.3.0release date: Fri, 06/30/2023
2023 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 5.2.0release date: Tue, 05/30/2023
2023 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 5.1.2release date: Wed, 03/29/2023
2023 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 5.1.1release date: Tue, 03/07/2023
2023 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin product 5.0.0release date: Sat, 04/23/2022
2022 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin product 4.1.0release date: Thu, 10/07/2021
2021 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin product 4.0.0release date: Wed, 12/30/2020
2020 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 3.4.0release date: Sat, 09/07/2019 2019 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 3.3.0release date: Sun, 04/14/2019 2019 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 3.2.0release date: Sun, 08/19/2018 2018 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 3.1.0release date: Tue, 05/08/2018 2018 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 3.0.0release date: Tue, 10/17/2017 2017 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.9.0release date: Sun, 06/04/2017 2017 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.8.0 (security)release date: Sat, 04/01/2017 2017 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.6.0 (security)release date: Mon, 10/10/2016 2016 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.5.1release date: Sun, 01/24/2016 2016 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.5.0release date: Tue, 09/29/2015 2015 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.4.1 (security)release date: Fri, 04/24/2015 2015 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.4.0release date: Thu, 03/05/2015 2015 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.3.1release date: Thu, 01/15/2015 2015 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.3.0release date: Thu, 08/14/2014 2014 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.2.1release date: Mon, 06/09/2014 2014 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.2.0release date: Thu, 05/01/2014 2014 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.1.0 (security)release date: Sat, 04/12/2014 2014 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.0.2release date: Tue, 03/04/2014 2014 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.0.1release date: Tue, 12/17/2013 2013 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 2.0.0release date: Sun, 12/01/2013 2013 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 1.6.1release date: Tue, 08/20/2013 2013 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 1.5.1release date: Tue, 01/29/2013 2013 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 1.5.0release date: Sun, 01/13/2013 2013 |
||||||||||||||||||||||||||||||||||||||||||||||||
Nagwin 1.3.0release date: Sun, 04/22/2012 2012 |