Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Alignak checks pack for Windows NSCA monitored hosts

Project description

Checks pack for monitoring Windows hosts with NSCA passive checks

Most recent PyPi version Join the chat #alignak on License AGPL v3


The installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg. /usr/local/etc/alignak). The copied files are located in the default sub-directory used for the packs (eg. arbiter/packs).

From PyPI

To install the package from PyPI:

sudo pip install alignak-checks-windows-nsca

From source files

To install the package from the source files:

git clone
cd alignak-checks-windows-nsca
sudo pip install .

Note: using `sudo python install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)



This checks pack do not need any specific configuration.

Prepare Windows host

Some operations are necessary on the Windows monitored hosts if NSClient++ is not yet installed and running.

Install and configure NSClient++ for scheduled NSCA checks.

The first example below is an NSClient configuration file and it schedules the NSCa checks with the default NSClient pre-installed commands (see alias). The second example is an NSClient registry configuration that defines its own commands in the NSCA scheduled checks. Anyway, for more information, we invite you to consult the NSClient ++ Web site.

NSClient++ Ini file configuration example:

CheckDisk = 1
CheckEventLog = 1
CheckExternalScripts = 1
CheckHelpers = 1
CheckNSCP = 1
CheckSystem = 1
CheckWMI = 1
NSCAClient = 1
Scheduler = 1

; Alignak server Ip address
allowed hosts = address =

[/settings/external scripts/alias]
alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30s
alias_cpu_ex = checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
alias_disk = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
alias_disk_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED ignore-unreadable
alias_event_log = CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational') AND source != 'SideBySide'" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
alias_file_age = checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%"
alias_file_size = CheckFiles "filter=size > $ARG2$" "path=$ARG1$" MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%" max-dir-depth=10
alias_mem = checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged type=page
alias_process = checkProcState "$ARG1$=started"
alias_process_count = checkProcState MaxWarnCount=$ARG2$ MaxCritCount=$ARG3$ "$ARG1$=started"
alias_process_hung = checkProcState MaxWarnCount=1 MaxCritCount=1 "$ARG1$=hung"
alias_process_stopped = checkProcState "$ARG1$=stopped"
alias_sched_all = CheckTaskSched "filter=exit_code ne 0" "syntax=%title%: %exit_code%" warn=>0
alias_sched_long = CheckTaskSched "filter=status = 'running' AND most_recent_run_time < -$ARG1$" "syntax=%title% (%most_recent_run_time%)" warn=>0
alias_sched_task = CheckTaskSched "filter=title eq '$ARG1$' AND exit_code ne 0" "syntax=%title% (%most_recent_run_time%)" warn=>0
alias_service = checkServiceState CheckAll
alias_service_ex = checkServiceState CheckAll "exclude=Net Driver HPZ12" "exclude=Pml Driver HPZ12" exclude=stisvc
alias_up = checkUpTime MinWarn=1d MinWarn=1h
alias_updates = check_updates -warning 0 -critical 0
alias_volumes = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED
alias_volumes_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED ignore-unreadable
default =

threads = 5

channel = NSCA
interval = 300s
report = all


; Services to be checked
nsca_cpu = alias_cpu
nsca_memory = alias_mem
nsca_disk = alias_disk
nsca_uptime = alias_up
nsca_services = alias_service_ex

channel = NSCA

; The same host name configured in Alignak
hostname = win2k8


; Alignak server Ip address
address =
port = 5667
allowed ciphers = ADH
certificate =
encryption =
password = change-me
timeout = 30
use ssl = false
verify mode = none

date format = %Y-%m-%d %H:%M:%S
file name = ${exe-path}/nsclient.log
level = info


; Undocumented key
alias = host_check

; SCHEDULE COMMAND - Command to execute
command = check_ok

[/settings/external scripts/wrappings]

bat = scripts\\%SCRIPT% %ARGS%

ps1 = cmd /c echo If (-Not (Test-Path "scripts\%SCRIPT%") ) { Write-Host "UNKNOWN: Script `"%SCRIPT%`" not found."; exit(3) }; scripts\%SCRIPT% $ARGS$; exit($lastexitcode) | powershell.exe /noprofile -command -

vbs = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%

NSClient++ registry configuration example:

Windows Registry Editor Version 5.00






"use ssl"=dword:00000000
"allowed ciphers"=""
"verify mode"="none"
"payload length"="4096"
"buffer length"="4096"




"command"="CheckCPU warn=75 crit=90 time=30m time=15m time=5m"

"command"="CheckDriveSize Drive=C: MaxWarn=75% MaxCrit=85%"

"command"="CheckMem MaxWarn=75% MaxCrit=90% ShowAll type=physical type=virtual type=paged type=page"

"command"="CheckUptime MaxCrit=25h MinWarn=35m"

"command"="CheckServiceState CheckAll exclude=ShellHWDetection exclude=MMCSS exclude=clr_optimization_v4.0.30319_32 exclude=sppsvc exclude=StiSvc exclude=WMPNetworkSvc exclude=debugregsvc exclude=DoSvc exclude=MapsBroker exclude=CDPSvc exclude=WbioSrvc exclude=gpsvc exclude=tiledatamodelsvc exclude=wscsvc"


Alignak configuration

You simply have to tag the concerned hosts with the template windows-passive-host.

define host{
    use                     windows-passive-host
    host_name               my_windows_passive_host

and this host will automatically inherit from the template parameters and services.

Bugs, issues and contributing

Contributions to this project are welcome and encouraged … issues in the project repository are the common way to raise an information.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for alignak_checks_windows_nsca, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size alignak_checks_windows_nsca-1.0.0.tar.gz (22.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page