You are here

Most (not all hosts) just disappeared from settings --> Hosts and Settings --> Hostgroups

3 posts / 0 new
Last post
chuxuzoeto
chuxuzoeto's picture
Most (not all hosts) just disappeared from settings --> Hosts and Settings --> Hostgroups

Serious puzzle here ..

I had been re-jigging some attributes, and hostgroups and service groups and all were well .. stepped aside for a coffee, then came back 10 minutes later to add new hosts, and:

  • out of about 30 hosts that were there, only 3 are listed now (probably the last 3 hosts I entered)
  • similarly all other hostgroups are gone, except the hostgroup for the 3 hosts listed in the hosts section
  • similar situation with hostgroup hierarchy:  only hostgroup for 3 visible hosts is show
  • Meanwhile, all monitoring status pages are correct and display all hosts and checks
  • all checks and alerts seem to be working 

So, I went down to the OS, but no suspect issues are reported in the opsview logs within /var/log/opsview .. mysql is up and serving .. no errors in error logs.

Logged into mysql, and 'select name,ip from hosts;' shows all my hosts are still there ..  similarly ' select name from hostgroups;' shows all the hostgroups are still intact.

The only clue I can see so far that it could be a permissions issue is:  if I go to the host templates list, and then click the name of any of the missing hosts, I end up on a page with a message displayed in a textbox with yellow background and a message 'Access Denied' .. 

But I have full admin privilleges, and the Administrator role where it comes from has been authorised for everything .. even viewport.

I have restarted all nagios and mysql related services several times, but there has been no change in the status.  Next step would be to start stracing the opsview-web process for clues as to what it's trying to do .. But I am sure there has to be a much simpler way to go about this.  

Would really appreciate any helpful suggestions or pointers .. 

 

 

chuxuzoeto
chuxuzoeto's picture
Re: Most (not all hosts) just disappeared from settings --> ...

I have verified from the apache logs that I actually get a HTTP 403 status (forbidden) when attempting to access the edit pages for the hosts that are no longer showing up .. 

http logs when I attempt to edit missing hosts

 

10.12.1.70 - - [27/Sep/2013:16:42:20 +0100] "GET /admin/hosttemplate/list HTTP/1.1" 200 97746 10.12.1.70 - - [27/Sep/2013:16:42:20 +0100] "GET /admin/hosttemplate/list HTTP/1.1" 200 97746 "http://10.12.1.136/admin/hosttemplate/edit/69" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.21 (KHTML, like Gecko) QupZilla/1.4.4 Safari/537.21" 10.12.1.70 - - [27/Sep/2013:16:42:34 +0100] "GET /admin/host/edit/4 HTTP/1.1" 403 23791 10.12.1.70 - - [27/Sep/2013:16:42:34 +0100] "GET /admin/host/edit/4 HTTP/1.1" 403 23791 "http://10.12.1.136/admin/hosttemplate/list" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.21 (KHTML, like Gecko) QupZilla/1.4.4 Safari/537.21"    
chuxuzoeto
chuxuzoeto's picture
Re: Most (not all hosts) just disappeared from settings --> ...

I have finally figured out the problem and this is now resolved ..

after going over so many things, including some of the changes, I looked again at the Administrator role section .. and in the 'Configuration' tab, I looked again at the 'Host Groups' list and scrolling through the list revealed that only the hostgroup with the hosts that are still visible had a selection on it.

So, it was as simple as multi-selecting all hostgroups and submitting the form and then reloading  .. So, it seems I must have accidentally clicked in the select list the last time I was there, and then next save effectively denied me access to all other hostgroups except the one that had been clicked.

Conclusion:

  • That 'Host Groups' section is not intuitive at all .. 
  • Perhaps a different control (check boxes, perhaps) should be used
  • Alternatively, very clear information explaining that the list of access privileges applies only to multi-selected hostgroups