You are here

Service checks pages links invalid with relocated web app

3 posts / 0 new
Last post
ericwilkison
ericwilkison's picture
Service checks pages links invalid with relocated web app

I have Opsview Core configured with the web root relocated to the /opsview folder by follwing the instructions from http://docs.opsview.com/doku.php?id=opsview4.4:advancedapache.  Specifically I've added the follwing lines to the opsview_web_local.yml:

override_base_prefix: /opsview Controller::Root: start_url: /opsview/status/hostgroup

After making this change most of the Opsview web works exactly as expected.  However the page links (Pages: 1 2 3 all) on the Service Checks > List page are no longer correctly formated.  The HTML produced for the links is now:

<p> Pages: 1&nbsp;<a href="/opsview/opsview/admin/servicecheck/list?page=2">2</a>&nbsp;<a href="/opsview/opsview/admin/servicecheck/list?page=3">3</a>&nbsp;<a href="/opsview/opsview/admin/servicecheck/list?page=all">all</a> </p>

Notice that the href for each link includes "/opsview" twice making the urls invalid.

 

 

smarsh
smarsh's picture
Re: Service checks pages links invalid with relocated web app

I'm not an Apache whizz by any stretch, but looking at your config:

override_base_prefix: /opsview Controller::Root: start_url: /opsview/status/hostgroup

and that all your hrefs's are /opsview/opsview, have you tried removing the '/opsview' from the start_url, i.e.

override_base_prefix: /opsview Controller::Root: start_url: /status/hostgroup

Sam

ericwilkison
ericwilkison's picture
Re: Service checks pages links invalid with relocated web app

Changing the start_url value had not effect.

I've noticed a second place where the same issue is manifesting itself.  With the configuration as I described before the refresh functions do not work correctly.  Go to Monitoring -> Host Groups, Monitoring -> Hosts, or Monitoring -> Services and click on the refresh button.  The display always goes back to Host Group Summary but with a second version of the page impeded into the page.  I've posted a screen capture at: https://docs.google.com/a/wilkison.com/file/d/0B7lmOO2e9JDgSEREbTRPZXhNZUk/edit?usp=drive_web

Again looking at the source code I found:

function refresh_content() { Element.hide('refresh_line'); Element.show('refresh_loading'); clearTimeout(countdown_timer); // foreach refreshListener for (var i=0,l=refreshListeners.length;i<l;i++) { refreshListeners[i](refresh_finish); } // Make AJAX call. Set to only show output if the call was successful but this doesn't appear to work in Prototype 1.6.0.1 if (useAjaxUpdater) { new Ajax.Updater({ success: 'main_content', failure: 'ignored' }, '/opsview/opsview/status/host?output=ajax', { asynchronous:true, evalScripts:true, method:'get', onSuccess: refresh_finish, onFailure: function(t) { refresh_finish(t, t.status + ": " + t.statusText); } }); } };Notice that the URL for the ajax call is /opsview/opsview/status/host?output=ajax. As before the /opsview path is included twice.