NAGIOS HTTP server authentication

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
colocho
Posts: 8
Joined: Mon Aug 05, 2013 5:08 pm

NAGIOS HTTP server authentication

Post by colocho »

hello please your help with this question.

Since nagios interface when I click on Host Groups I get this message:

It Appears as though you do not have any 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 esta CGI
and check the authorization options in your CGI configuration file.

I do not receive the same message when I click Hosts or Services, the settings have on file in the /usr/local/nagios/etc/cgi.cfg


# SYSTEM / PROCESS INFORMATION ACCESS
authorized_for_system_information = nagiosadmin

# CONFIGURATION INFORMATION ACCESS
authorized_for_configuration_information = nagiosadmin

# SYSTEM / PROCESS COMMAND ACCESS
authorized_for_system_commands = nagiosadmin

# GLOBAL HOST / VIEW SERVICE ACCESS
authorized_for_all_services = nagiosadmin
authorized_for_all_hosts = nagiosadmin

# GLOBAL HOST / SERVICE ACCESS COMMAND
authorized_for_all_service_commands = nagiosadmin
authorized_for_all_host_commands = nagiosadmin

This configuration file have in the /etc/apache2/conf.d/nagios.conf

ScriptAlias / nagios / cgi-bin "/ usr / local / nagios / sbin"

<Directory "/ usr / local / nagios / sbin">
# SSLRequireSSL
    Options ExecCGI
    AllowOverride None
    Order allow, deny
    Allow from all
# Order deny, allow
# Deny from all
# Allow from 127.0.0.1
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</ Directory>

Alias / nagios "/ usr / local / nagios / share"

<Directory "/ usr / local / nagios / share">
# SSLRequireSSL
    Options None
    AllowOverride None
    Order allow, deny
    Allow from all
# Order deny, allow
# Deny from all
# Allow from 127.0.0.1
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</ Directory>


Please I hope your help with this problem that haunts me !!!!!
colocho
Posts: 8
Joined: Mon Aug 05, 2013 5:08 pm

Re: NAGIOS HTTP server authentication

Post by colocho »

Hello .... I'll show you the result of error.log and access.log



root@xxx:/usr/local/nagios/etc/objects# tail -25 /var/log/apache2/error.log
[Fri Jan 30 11:10:09 2015] [notice] Apache/2.2.22 (Ubuntu) mod_fcgid/2.3.6 PHP/5.3.10-1ubuntu3.15 with Suhosin-Patch configured -- resuming normal operations
[Fri Jan 30 11:12:39 2015] [notice] caught SIGTERM, shutting down
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning: Module 'ssh2' already loaded in Unknown on line 0
[Fri Jan 30 11:12:40 2015] [notice] Apache/2.2.22 (Ubuntu) mod_fcgid/2.3.6 PHP/5.3.10-1ubuntu3.15 with Suhosin-Patch configured -- resuming normal operations
[Fri Jan 30 11:18:00 2015] [notice] caught SIGTERM, shutting down
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning: Module 'ssh2' already loaded in Unknown on line 0
[Fri Jan 30 11:23:18 2015] [notice] Apache/2.2.22 (Ubuntu) mod_fcgid/2.3.6 PHP/5.3.10-1ubuntu3.15 with Suhosin-Patch configured -- resuming normal operations
[Fri Jan 30 11:41:16 2015] [notice] caught SIGTERM, shutting down
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning: Module 'ssh2' already loaded in Unknown on line 0
[Fri Jan 30 11:41:17 2015] [notice] Apache/2.2.22 (Ubuntu) mod_fcgid/2.3.6 PHP/5.3.10-1ubuntu3.15 with Suhosin-Patch configured -- resuming normal operations
[Fri Jan 30 11:55:10 2015] [notice] caught SIGTERM, shutting down
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning: Module 'ssh2' already loaded in Unknown on line 0
[Fri Jan 30 11:55:11 2015] [notice] Apache/2.2.22 (Ubuntu) mod_fcgid/2.3.6 PHP/5.3.10-1ubuntu3.15 with Suhosin-Patch configured -- resuming normal operations
[Fri Jan 30 11:59:50 2015] [notice] caught SIGTERM, shutting down
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning: Module 'ssh2' already loaded in Unknown on line 0
[Fri Jan 30 11:59:51 2015] [notice] Apache/2.2.22 (Ubuntu) mod_fcgid/2.3.6 PHP/5.3.10-1ubuntu3.15 with Suhosin-Patch configured -- resuming normal operations
[Fri Jan 30 12:04:48 2015] [notice] caught SIGTERM, shutting down
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning: Module 'ssh2' already loaded in Unknown on line 0
[Fri Jan 30 12:04:49 2015] [notice] Apache/2.2.22 (Ubuntu) mod_fcgid/2.3.6 PHP/5.3.10-1ubuntu3.15 with Suhosin-Patch configured -- resuming normal operations


root@xxx:/usr/local/nagios/etc/objects# tail -25
/var/log/apache2/access.log


x.x.x.x - nagiosadmin [30/Jan/2015:12:02:10 -0500] "GET
/nagios/js/jquery-1.7.1.min.js HTTP/1.1" 304 213 "http://y.y.y.y:xy/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview"
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2100.0 Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:02:10 -0500] "GET
/nagios/nagiosgraph.js HTTP/1.1" 304 212 "http://y.y.y.y:xy/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview"
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2100.0 Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:02:10 -0500] "GET
/pnp4nagios/media/js/jquery-min.js HTTP/1.1" 304 213 "http://y.y.y.y:xy/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview"
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2100.0 Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:02:10 -0500] "GET
/pnp4nagios/media/js/jquery.cluetip.js HTTP/1.1" 304 212 "http://y.y.y.y:xy/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview"
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2100.0 Iron/39.0.2100.0 Safari/537.36"


::1 - - [30/Jan/2015:12:02:18 -0500] "OPTIONS *
HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal
dummy connection)"


::1 - - [30/Jan/2015:12:02:19 -0500] "OPTIONS *
HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal
dummy connection)"


::1 - - [30/Jan/2015:12:02:20 -0500] "OPTIONS *
HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal
dummy connection)"


172.20.1.172 - nagiosadmin [30/Jan/2015:12:03:01 -0500]
"GET http://172.20.1.172:85/nagios/ HTTP/1.0" 200 1088 "-"
"check_http/v1861 (nagios-plugins 1.4.11)"


172.20.1.172 - nagiosadmin [30/Jan/2015:12:04:01 -0500]
"GET http://172.20.1.172:85/nagios/ HTTP/1.0" 200 1088 "-"
"check_http/v1861 (nagios-plugins 1.4.11)"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:33 -0500] "GET
/nagios/cgi-bin/statusmap.cgi?host=all HTTP/1.1" 200 3036 "http://y.y.y.y:xy/nagios/side.php"
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2100.0 Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:35 -0500] "GET
/nagios/cgi-bin/status.cgi?host=all HTTP/1.1" 200 9163 "http://y.y.y.y:xy/nagios/side.php"
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2100.0 Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:33 -0500] "GET
/nagios/cgi-bin/statusmap.cgi?host=all&createimage&time=1422637473&canvas_x=0&canvas_y=0&canvas_width=1311&canvas_height=1062&max_width=0&max_height=0&layout=0&layermode=exclude
HTTP/1.1" 200 500955 "http://y.y.y.y:xy/nagios/cgi-bin/statusmap.cgi?host=all"
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2100.0 Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:36 -0500] "GET
/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview HTTP/1.1" 200
1989 "http://y.y.y.y:xy/nagios/side.php" "Mozilla/5.0 (Windows
NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2100.0
Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:37 -0500] "GET
/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview HTTP/1.1" 200
1988 "http://y.y.y.y:xy/nagios/side.php" "Mozilla/5.0 (Windows
NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2100.0
Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:38 -0500] "GET
/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview HTTP/1.1" 200
1989 "http://y.y.y.y:xy/nagios/side.php" "Mozilla/5.0 (Windows
NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2100.0
Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:38 -0500] "GET
/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview HTTP/1.1" 200
1989 "http://y.y.y.y:xy/nagios/side.php" "Mozilla/5.0 (Windows
NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2100.0
Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:56 -0500] "GET
/nagios/cgi-bin/statusmap.cgi?host=all HTTP/1.1" 200 3038 "http://y.y.y.y:xy/nagios/side.php"
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2100.0 Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:57 -0500] "GET
/nagios/cgi-bin/status.cgi?hostgroup=all&style=hostdetail HTTP/1.1"
200 2687 "http://y.y.y.y:xy/nagios/side.php" "Mozilla/5.0
(Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/39.0.2100.0 Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:56 -0500] "GET
/nagios/cgi-bin/statusmap.cgi?host=all&createimage&time=1422637496&canvas_x=0&canvas_y=0&canvas_width=1311&canvas_height=1062&max_width=0&max_height=0&layout=0&layermode=exclude
HTTP/1.1" 200 302235 "http://y.y.y.y:xy/nagios/cgi-bin/statusmap.cgi?host=all"
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2100.0 Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:58 -0500] "GET
/nagios/cgi-bin/status.cgi?host=all HTTP/1.1" 200 9157 "http://y.y.y.y:xy/nagios/side.php"
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2100.0 Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:04:59 -0500] "GET
/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview HTTP/1.1" 200
1989 "http://y.y.y.y:xy/nagios/side.php" "Mozilla/5.0 (Windows
NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2100.0
Iron/39.0.2100.0 Safari/537.36"


172.20.1.172 - nagiosadmin [30/Jan/2015:12:05:01 -0500]
"GET http://172.20.1.172:85/nagios/ HTTP/1.0" 200 1088 "-"
"check_http/v1861 (nagios-plugins 1.4.11)"


x.x.x.x - nagiosadmin [30/Jan/2015:12:05:45 -0500] "GET
/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview HTTP/1.1" 200
1990 "http://y.y.y.y:xy/nagios/side.php" "Mozilla/5.0 (Windows
NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2100.0
Iron/39.0.2100.0 Safari/537.36"


x.x.x.x - nagiosadmin [30/Jan/2015:12:05:46 -0500] "GET
/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview HTTP/1.1" 200
1989 "http://y.y.y.y:xy/nagios/side.php" "Mozilla/5.0 (Windows
NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2100.0
Iron/39.0.2100.0 Safari/537.36"


172.20.1.172 - nagiosadmin [30/Jan/2015:12:06:01 -0500]
"GET http://172.20.1.172:85/nagios/ HTTP/1.0" 200 1088 "-"
"check_http/v1861 (nagios-plugins 1.4.11)"
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NAGIOS HTTP server authentication

Post by scottwilkerson »

Is your user a contact for the hosts that are added to any of the hostgroups you have configured?

Do you have hostgroups configured?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
colocho
Posts: 8
Joined: Mon Aug 05, 2013 5:08 pm

Re: NAGIOS HTTP server authentication

Post by colocho »

Hi ... thanks for your help the problem definitely were configured groups .... Now everything works great your answers are very useful!

Please Enlighten doubt, NagiosQL supports NAGIOS 4.0.8 ???
Locked