I have hostgroups.cfg file in which i have different hosts with different port no. I want to pass port no for every host to services.cfg file where i have put check_http command.
As my different hosts have different http processes with different port no, so I want to pass port no directly from hosts.cfg file. Is it possible?
Below are my sample entries in hosts and services.cfg file
host file:
define host{
use abc
host_name test
alias /test/
address 192.168.0.24
hostgroups testgroup
}
services.cfg file
define service{
use critical-service
hostgroup_name test
service_description HTTP
check_command check_http!8080!7!5
}
commands.cfg file
define command{
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$ -p
$ARG1$ --url $HOSTALIAS$ -c $ARG2$ -w $ARG3$
}