Results 1 to 5 of 5

Thread: Facing an issue with nagios

  1. #1
    Senior Member
    Join Date
    Jun 2007
    Location
    Hyderabad, AP, India
    Posts
    806
    Thanks
    44
    Thanked 55 Times in 48 Posts
    Rep Power
    13

    Default Facing an issue with nagios

    Hi all when i am configuring nagios for the below command i am getting an error

    chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
    chcon: can't apply partial context to unlabeled file /usr/local/nagios/sbin/

    and NAGIOS,apache is running fine and good but i am not able to access http://localhost/nagios

    Forbidden

    You don't have permission to access /nagios/ on this server.

    I checked apache logs and came to know there is issue with permission as follows


    [error] [client test] Directory index forbidden by Options directive: /usr/local/nagios/share/
    [error] [client test] Directory index forbidden by Options directive: /usr/local/nagios/share/
    [notice] caught SIGTERM, shutting down


    How to proceed with this issues?

  2. #2
    Contributors jaysunn's Avatar
    Join Date
    Apr 2009
    Location
    NYC - USA
    Posts
    1,027
    Thanks
    165
    Thanked 154 Times in 133 Posts
    Rep Power
    24

    Default

    Hello,
    Please post us your configuration in apache for Nagios. Here is what mine looks like.

    Code:
       #
        ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
    
        #
        # "/usr/local/apache/cgi-bin" should be changed to whatever your ScriptAliased
        # CGI directory exists, if you have that configured.
        #
        <Directory "/var/www/cgi-bin">
            AllowOverride None
            Options ExecCGI
            Order allow,deny
            Allow from all
        </Directory>
    
         ScriptAlias /nagios/cgi-bin/ "/usr/local/nagios/sbin/"
    
         <Directory "/usr/local/nagios/sbin/">
             AllowOverride AuthConfig
             Options ExecCGI
             Order allow,deny
             Allow from all
         </Directory>
    
         Alias /nagios/ "/usr/local/nagios/share/"
         <Directory "/usr/local/nagios/share/">
             Options None
             AllowOverride AuthConfig
             Order allow,deny
             Allow from all
         </Directory>
    Also please provide us with:

    Code:
    Prompt>ls -alh /usr/local/nagios


    Also check if selinux is enabled:

    Code:
    prompt>getenforce

    Test that this the cause by putting selinux in permissive mode:

    Code:
    prompt>setenforce 0
    Try accessing nagios.

    If that works, turn back on selinux and run this command:

    Code:
    prompt>chcon -R -u system_u -r object_r -t httpd_sys_content_t /usr/local/nagios/sbin/
    HTH

    jaysunn
    Last edited by jaysunn; 21st August 2009 at 12:11 AM. Reason: added more commands

  3. #3
    Senior Member
    Join Date
    Jun 2007
    Location
    Hyderabad, AP, India
    Posts
    806
    Thanks
    44
    Thanked 55 Times in 48 Posts
    Rep Power
    13

    Default Hay got the solution

    I checked some of the forumes you mention previously, i came across one post which mention that after cofiguration of NAGIOS, its better to restart the apache to update all the configurations made in apache to take effect, did the same, it work like magic... i can do work on NAGIOS now..

    thanks,
    Surendra.

  4. #4
    Contributors jaysunn's Avatar
    Join Date
    Apr 2009
    Location
    NYC - USA
    Posts
    1,027
    Thanks
    165
    Thanked 154 Times in 133 Posts
    Rep Power
    24

    Default

    Thats Great ,

    Nagios is a great tool for monitoring systems. Be sure to have a look at the notifications section. You can easily configure nagios to page or SMS messages to cell phones and other devices.

    This makes monitoring systems a lot easier.


    Great Work,

    Jaysunn

  5. #5
    Junior Member
    Join Date
    May 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Hi,

    If you followed the documents you changed the file type & sElinux is in permissive mode--right
    chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
    chcon -R -t httpd_sys_content_t /usr/local/nagios/share/


    Just install the php* it will work. Before that you can check by renaming the file index.php into index.html which is in /usr/local/nagios/share/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Facing an issue with squid reverse proxy
    By kumarat9pm in forum Proxy Servers
    Replies: 5
    Last Post: 15th July 2010, 06:00 PM
  2. Regarding NAGIOS
    By kumarat9pm in forum Networking, Firewalls and Security
    Replies: 2
    Last Post: 6th August 2009, 11:19 AM
  3. Facing an issue when installing createrepo
    By kumarat9pm in forum CentOS / RHEL / Fedora
    Replies: 4
    Last Post: 30th July 2009, 12:58 PM
  4. Facing problem configuring DNS on RHEL 5
    By mhasan in forum Domain Name Server
    Replies: 1
    Last Post: 30th June 2009, 10:22 AM
  5. Nagios on tomcat?
    By Vince-0 in forum Linux software
    Replies: 0
    Last Post: 22nd April 2008, 01:30 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •