-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #759 from Alignak-monitoring/update-hostgroups-tests
Improve tests (service / hostgroups)
- Loading branch information
Showing
2 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
cfg_dir=../default | ||
|
||
# Issue #65 | ||
|
||
# Host template | ||
define host{ | ||
name template01 | ||
check_interval 4 | ||
max_check_attempts 6 | ||
register 0 | ||
|
||
check_period 24x7 | ||
} | ||
|
||
# Hosts | ||
define host{ | ||
use template01 | ||
host_name srv01 | ||
address 192.168.1.11 | ||
check_command check_tcp!3306!5!8 | ||
event_handler my_host_event_handler | ||
hostgroups tcp_hosts | ||
} | ||
|
||
define host{ | ||
use template01 | ||
host_name srv02 | ||
address 192.168.1.12 | ||
check_command check_tcp!80!5!8 | ||
event_handler my_host_event_handler | ||
hostgroups tcp_hosts | ||
} | ||
|
||
define host{ | ||
use template01 | ||
host_name srv03 | ||
address 192.168.1.13 | ||
check_command check_tcp | ||
event_handler my_host_event_handler | ||
hostgroups tcp_hosts | ||
} | ||
|
||
|
||
define command{ | ||
command_name check_tcp | ||
command_line $PLUGINSDIR$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ | ||
} | ||
|
||
define command{ | ||
command_name my_host_event_handler | ||
command_line /home/alignak/eventhandler.sh "ALIGNAK-EVENT HOST hHOSTNAME $HOSTNAME$" | ||
} | ||
|
||
define timeperiod{ | ||
timeperiod_name 24x7 | ||
alias Always | ||
sunday 00:00-24:00 | ||
monday 00:00-24:00 | ||
tuesday 00:00-24:00 | ||
wednesday 00:00-24:00 | ||
thursday 00:00-24:00 | ||
friday 00:00-24:00 | ||
saturday 00:00-24:00 | ||
} | ||
define timeperiod{ | ||
timeperiod_name none | ||
alias Never | ||
} | ||
|
||
|
||
define service { | ||
use generic-service | ||
hostgroup_name tcp_hosts | ||
service_description TCP | ||
check_command check_tcp | ||
} | ||
|
||
define hostgroup { | ||
hostgroup_name tcp_hosts | ||
alias TCP Servers | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters