Checking multiple ports with check_tcp?

Rather than having to define multiple services for each port I want to check on a box remotely can I check them all in one command? I tried comma seperating them but that didn’t work. I’d want something like

define service{
host_name HOSTNAME
service_description PORTSCAN
is_volatile 0
check_period 24x7
max_check_attempts 4
normal_check_interval 5
retry_check_interval 1
contact_groups admins
notification_interval 960
notification_period 24x7
check_command check_tcp!10,20,30,40,50
}

Something like that. So I could basically portscan a box to make sure all is up…

Thanks,

Ross

Having a port open and having the daemon actually operational are 2 different things.

To answer, no, check_tcp is not like the command check_snmp where you can use multiple checks in same command.

Personally, I’d use a check that actually makes an attempt to login to an ftp server, etc, so that you know for sure, the daemon is up and responding correctly.