No announcement yet.

Configuring check_http for an alternate port

This topic is closed.
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuring check_http for an alternate port


    I am looking to monitor a web server running on a different port than 80. I am aware that check_http can accomplish this with the -p switch but I'm not sure how to do this in oreon. I tried creating a new check_http_with_ping service command with the following config:

    Then, I put the port number in the args field when I'm modifying the service like this:

    However, when I go to export the nagios configuration I get the following error:

    Error: Service check command 'check_http_with_port40002' specified in service 'AP1' for host 'Gateway' not defined anywhere!

    Basically I'm forwarding traffic through a router to several web servers and would like to be able to setup several 'services' on the router's ip that will check the various ports for web availability. Am I misunderstanding the use of the 'Args' field in the service definition page?
    Everything everywhere is allready allright...

  • #2
    just add ! in front of your argument

    Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
    Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
    Fedora Core 5 - 2.6.20-1.2320


    • #3

      that worked. just for everyone else's info, you can have multiple arguments by putting them in the args field with '!' in front of them. e.g.:

      !40002 !usernameassword

      that way you can have something like this in your service command definition like this:

      $USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$ -a $ARG2$
      Everything everywhere is allready allright...