Windows Updates in Nagios

We’re currently using Nagios as our main monitoring system at the Department. There’s actually no need to change that (even though I tried SCOM 2012). Things that I’ve been missing in our current Nagios setup are notifications about Windows Updates. Well, honestly I haven’t even looked into that specific “problem” before now. That said, I decided to give it a try.

I started by doing some googling and found a nice solution which uses  NSClient++ ( and a script ( which checks for updates. I followed the steps with some minor changes:

  • Installed NSClient++ on the Windows Server(s)
  • Edited nsclient.ini (NSC.ini is for older versions):

NRPEServer = 1

port=5667 (default port wouldn’t work for some reason)

[/settings/external scripts/scripts]
check_win_updates=cscript.exe //T:90 //NoLogo scripts\\check_windows_updates.wsf /w:1 /c:10

; ALLOWED HOSTS – A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges.
allowed hosts =


  • On server side:


define command {
    command_name    check_win_updates
    command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5667 -c check_win_updates -t 120


define service {
    hostgroup_name               check-win-updates
    service_description            Windows Updates
    check_command               check_win_updates
    use                                     generic-service
    check_interval                  2880


define hostgroup {
    hostgroup_name          check-win-updates
    alias                           Windows Updates
    members                 server1,server2 (Lets call the servers server1 and server2 in this example)


Play around with the timers ( –t) and see what suit your needs. If you want to check other stuff as well (harddisk space, cpu usage and so on) you have to configure a bit more.


In our case it was enough with Windows Updates checking however.

Here’s a screenshot (Fig 1) from nagstamon running on my Windows 8 client:


Fig 1. nagstamon

There’s currently no information about Windows Updates as all our servers were already updated before the screenshot 🙂 The other information is from different linux servers and printers. Here’s another screenshot (fig 2) from the Nagios web interface:


Fig 2. Host information/status detail for host in Nagios

Here you can see that the Windows Update check is running and that no updates are waiting or installing.

So, there you have it – Windows Updates in Nagios.

One thought on “Windows Updates in Nagios

  1. Pingback: Monitoring Windows Updates with Nagios | Dave Umrysh

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s