Page 1 of 1

error in nagios 4.3.1 when searching!

Posted: Wed Jun 14, 2017 3:18 am
by majed
Peace, i can see the hosts when i click hosts or services but when i try to search i get:

Code: Select all

It appears as though you do not have permission to view information for any of the hosts you requested...

If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.
here is my apache nagios configuration:
/etc/apache2/modules.d/99_nagios4.conf

Code: Select all

<IfDefine NAGIOS>

  ScriptAlias /nagios/cgi-bin/ /usr/lib64/nagios/cgi-bin/
  <Directory "/usr/lib64/nagios/cgi-bin/">
    AllowOverride AuthConfig
	#AllowOverride None
    Options ExecCGI
	<RequireAll>
	Require all granted
	AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /etc/nagios/htpasswd.users
   Require valid-user
   </RequireAll>
  </Directory>
  


  Alias /nagios /usr/share/nagios/htdocs/
  <Directory "/usr/share/nagios/htdocs/">
    AllowOverride AuthConfig
	#AllowOverride None
	<RequireAll>
	Require all granted
	AuthName "Nagios Access"
	AuthType Basic
	AuthUserFile /etc/nagios/htpasswd.users
	Require valid-user
	</RequireAll>
  </Directory>

</IfDefine>
/etc/nagios/cgi.cfg

Code: Select all

main_config_file=/etc/nagios/nagios.cfg
physical_html_path=/usr/share/nagios/htdocs/
url_html_path=/nagios
show_context_help=0
use_pending_states=1
use_authentication=1
use_ssl_authentication=0
authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin
default_statusmap_layout=5
default_statuswrl_layout=4
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
refresh_rate=90
result_limit=0
escape_html_tags=1
action_url_target=_blank
notes_url_target=_blank
lock_author_names=1
navbar_search_for_addresses=1
navbar_search_for_aliases=1
any help?

Re: error in nagios 4.3.1 when searching!

Posted: Wed Jun 14, 2017 10:31 am
by scottwilkerson
What user are you logged in as? (see upper left corner)

Re: error in nagios 4.3.1 when searching!

Posted: Thu Jun 15, 2017 3:23 am
by majed
I thought that was too obvious, needless to mention that it is nagiosadmin.

Re: error in nagios 4.3.1 when searching!

Posted: Thu Jun 15, 2017 12:42 pm
by scottwilkerson
Can you search for a host you know exists, such as localhost?

The message you describe is displayed if your search has no results.

Re: error in nagios 4.3.1 when searching!

Posted: Fri Jun 16, 2017 12:59 am
by majed
wow, it worked! but i thought it would find the host if i type just part of it! sounds like a bug.