Talk:Nagios

From ArchWiki
Jump to: navigation, search

For use with lighttpd without htpasswd

Helped from the gentoo wiki I created a plain text /etc/nagios/passwd containing this line:

nagiosadmin:PasswordInPlainText

Then I used this config for setting it up with lighttpd (/etc/lighttpd/conf.d/nagios.conf):

$HTTP["url"] =~ "^/nagios" {
        alias.url = (
                "/nagios/cgi-bin" => "/usr/share/nagios/sbin",
                "/nagios" => "/usr/share/nagios/share" 
        )

        $HTTP["url"] =~ "^/nagios/cgi-bin" {
                cgi.assign = ( "" => "" )
        }

        #auth.backend = "htpasswd" 
        #auth.backend.htpasswd.userfile = "/etc/nagios/passwd" 
        auth.backend ="plain"    # The password is stored as plain text as user:password in...
        auth.backend.plain.userfile = "/etc/nagios/passwd"  # this file
        auth.require = ( "" => (
                "method" => "basic",
                "realm" => "nagios",
                "require" => "user=nagiosadmin" 
                )
        )
}

If anybody needs anything specific please indicate.