title: Port monitoring using nagios
body: <p>I want to monitor a ruby program using nagios3.3.1 . I have nagios installed on Centos5.7 and the the ruby program is in windows server 2012 r2 64 bit.
   I just tried it by opening a port 4546 using ruby program and monitor that port using check_tcp plugin. 
  Below is my service definition.</p>
  
  <pre><code>define service {
  use  local-service
  
  host_name  winserver-2012
  
  service_description  monitor ruby
  
  check_command  check_tcp!4546
  
  }
  </code></pre>
  
  <p>But the result is "CRITICAL-Socket timeout after 10 seconds"..</p>
  
  <p>What should I do for monitoring a ruby program? Is it possible to monitor a port which is just opened.?</p>