Nagios - bad Status-CGI link *** SOLVED ***
szpaciu last edited by
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:
Database schema: ndoutils
DB Prefix: nagios_
in Administration -> Modules -> Nagios -> Nagios Host:
CGI (WWW): /cgi-bin/nagios3/
Export path: http://our_ip/cgi-bin/nagios3/
Then, in server nagios config:
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:
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.
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.