Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    Nagios - bad Status-CGI link *** SOLVED ***

    Scheduled Pinned Locked Moved Operating
    1 Posts 1 Posters 8.1k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      szpaciu
      last edited by

      Hello Everyone 🙂

      I am testing i-doit and it's integration with nagios for my company. I set up nagios with ndoutils on the same server (works fine) and then configure i-doit with it.
      Precisely - I have nagios at "http://our_ip/nagios3/" and i-doit at "http://our_ip/i-doit/". I use the latest idoit version (0.9.9-7) and nagios 3 3.2.1-2 from debian repo.
      In Administration -> Modules -> Nagios -> NDO MySQL Server, I set up:
      Active: Yes
      IP:         our_ip
      Port: 3306
      Database schema: ndoutils
      DB Prefix:                 nagios_
      Username:                 ndoutils
      Password:                 ***

      in Administration -> Modules -> Nagios -> Nagios Host:
      Host:                 our_ip
      CGI (WWW): /cgi-bin/nagios3/
      Export path:    http://our_ip/cgi-bin/nagios3/

      Then, in server nagios config:
      Active:                      yes
      Nagios Host:          our_ip [selected this, i have configured before]
      NDO Host:              our_ip (ndoutils) [selected from list]
      hostname:                server [the same name, i have set in nagios config]

      I-doit connect to database, read the state of host, when I click on the 'state icon' in server Overview Page or Nagios Status column in Servers List, I get "http://our_ip/cgi-bin/nagios3//status.cgi?host=server" in new tab - it works fine - I suppose - I can get detail info from Nagios.
      The problem is in server Nagios tab - place where we can set up nagios for each host and have Host State Information and NDO Parameter. The NDO Parameter have line:
      Status-CGI our_ip/cgi-bin/nagios3//status.cgi?host=server
      and it looks good, but if I click it (or just move mouse over) I get link to "http://our_ip/i-doit/our_ip/cgi-bin/nagios3//status.cgi?host=server" and it, of course, lead us to nowhere.

      I tried few combinations in Nagios Host config, but nothing works - i-doit adds address to itself (http://our_ip/i-doit/) before appropriate address (our_ip/cgi-bin/nagios3//status.cgi?host=server) in this link. I don't know what exactly do export path in Nagios Host configuration (in Administration) - I can leave it blank and it doesn't matter.

      Any ideas? 🙂

      SOLUTION:

      In Nagios Host configuration, CGI (WWW): /cgi-bin/nagios3/ must be WITHOUT last slash - idoit add "/status.cgi?host=[host_name]", so it's unnecessary. It shouldn't make any difference, but it does…
      If slash is duplicated, like that: "our_ip/cgi-bin/nagios3//status.cgi?host=server", idoit add address to itself before link. When there is no unneeded "/", everything works fine.

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post