Host A config:
Code: Select all
define host {
use host-notify-is
host_name server-a
address xxx.xxx.xxx.xxx
hostgroups windows,server2019
check_command check-host-alive
max_check_attempts 10
}
RDP Service config:
Code: Select all
define service {
use notify-is
hostgroup_name windows
host_name !server-a
service_description RDP
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
check_command check_tcp!3389
}
Nagios Configuration Check:
Code: Select all
Nagios Core 4.2.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-06-2016
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Could not find any host matching '!'server-a'' (config file '/usr/local/nagios/etc/services/windows.cfg', starting on line 24)
Error: Failed to expand host list '!'ln-veeam-backup01.qa'' for service 'RDP' (/usr/local/nagios/etc/services/windows.cfg:24)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.