This being my first post kindly excuse if any errors!
I would like to know if its possible to check multiple ports on a machine using check_tcp plugin.
I have a critical server which needs to be monitored with 5 different tcp ports
Something like (under services.cfg)
define service {
service_description TCP_CHECK
use tcp-service
contact_groups tcpadmins
check_command check_tcp!26585,4333,5555,6666,7777
host_name alpha2
}
I’m not really familiar with check_tcp, but it seems to only accept 1 port. Maybe a good solution could be to define 1 service per port to monitor, and a service group to gather this services: nagios.sourceforge.net/docs/2_0/ … rvicegroup
Thanks a lot Jean for a quick response.
I already do that… defining 1 service per port.
But i have too many hosts to be monitored, each having ‘n’ number of ports to be checked. This way it makes services.cfg a bulky file with too much repetition.
well, you could write a small script that would take your list of ports as argument and call check_tcp for each port in this list.
it should be easy enough and will spare you from writing a lot of cfg files