Getting Started
Use SNClient to monitor CPU usage, physical memory usage, and drive C: disk usage on Windows.
We recommend OMD Labs. It includes
Naemon, the Thruk web interface, and the check_snclient plugin.
Naemon uses this plugin to query the SNClient REST API over HTTPS.
Install SNClient on Windows
Follow the installation instructions, specifically the Windows installation, to install the MSI package. During installation:
- Keep the REST web server enabled with HTTPS on port 8443.
- Set a password and allow the IP address of your OMD monitoring server.
- Make sure that the monitoring server can reach TCP port 8443 on the Windows host. The MSI installer creates the Windows firewall exception.
Open an elevated command prompt in the directory that contains the downloaded MSI. Run this command with your MSI filename, IP address, and password:
msiexec.exe /i snclient.msi ALLOWEDHOSTS="127.0.0.1,::1,192.0.2.10" PASSWORD="your-password"
Here, 192.0.2.10 is the monitoring server. SNClient enables the built-in CPU and disk checks by default.
These checks do not need external scripts.
Prepare OMD
Install OMD Labs on a Linux monitoring server using the OMD installation instructions. If you do not already have a site, create one and start it.
Run the following Linux commands as the OMD site user. For an existing site,
switch to its user with omd su <site> instead.
The plugin is at ~/lib/monitoring-plugins/check_snclient.
To test the connection, replace 192.0.2.20 with the Windows host’s address.
Use the password you set during installation:
~/lib/monitoring-plugins/check_snclient -k -p 'your-password' -u 'https://192.0.2.20:8443'
~/lib/monitoring-plugins/check_snclient -k -p 'your-password' -u 'https://192.0.2.20:8443' check_cpu
~/lib/monitoring-plugins/check_snclient -k -p 'your-password' -u 'https://192.0.2.20:8443' check_memory "type=physical"
~/lib/monitoring-plugins/check_snclient -k -p 'your-password' -u 'https://192.0.2.20:8443' check_drivesize "drive=C:\\"
The first command should report that the REST API is reachable. If it fails, check the password, allowed hosts, and firewall settings before continuing.
These examples use -k to skip verification of the certificate shipped with SNClient.
For verified TLS, configure a trusted server certificate and remove -k.
For a private CA, use the plugin’s -ca option.
See the check_snclient options for details.
Configure Naemon
Create ~/etc/naemon/conf.d/windows.cfg with the following configuration.
Replace the address and password with the values used above. The example uses
the OMD generic-host and generic-service templates. In OMD, $USER1$ points
to ~/lib/monitoring-plugins.
define command {
command_name check_snclient
command_line $USER1$/check_snclient -k -p 'your-password' -u 'https://$HOSTADDRESS$:8443' $ARG1$ $ARG2$
}
define host {
use generic-host
host_name windows-server
alias Windows Server
address 192.0.2.20
check_command check_snclient
}
define service {
use generic-service
host_name windows-server
service_description CPU
check_command check_snclient!check_cpu!'warn=load > 80' 'crit=load > 90'
}
define service {
use generic-service
host_name windows-server
service_description Memory
check_command check_snclient!check_memory!type=physical 'warn=used > 80%' 'crit=used > 90%'
}
define service {
use generic-service
host_name windows-server
service_description Drive C
check_command check_snclient!check_drivesize!drive=C: 'warn=used > 80%' 'crit=used > 90%'
}
The host check tests REST API connectivity. The three services warn above 80% usage and become critical above 90%.
Validate the configuration. If validation succeeds, reload Naemon:
naemon -v ~/etc/naemon/naemon.cfg
omd reload naemon
Open the site’s Thruk interface at https://<monitoring-server>/<site>/thruk/.
After the first checks run, the windows-server host and its CPU, Memory, and
Drive C services should show their status and performance data.
For more options, see check_cpu, check_memory, and check_drivesize.
See the full list of SNClient check commands.