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.
# enable nagiosgraph CGI scripts
ScriptAlias /nagiosgraph/cgi-bin /usr/local/nagiosgraph/cgi-bin
<Directory "/usr/local/nagiosgraph/cgi-bin">
Options ExecCGI
AllowOverride None
# Order allow,deny
# Allow from all
# AuthName "Nagios Access"
# AuthType Basic
# AuthUserFile NAGIOS_ETC_DIR/htpasswd.users
# Require valid-user
</Directory>
# enable nagiosgraph CSS and JavaScript
Alias /nagiosgraph "/usr/local/nagiosgraph/share"
<Directory "/usr/local/nagiosgraph/share">
Options None
AllowOverride None
# Order allow,deny
# Allow from all
nagios@nagios:~$ sudo service apache2 restart
* Restarting web server apache2 [Tue Mar 29 19:19:04.577156 2016] [alias:warn] [pid 1879] AH00671: The ScriptAlias directive in /usr/local/nagiosgraph/etc/nagiosgraph-apache.conf at line 2 will probably never match because it overlaps an earlier ScriptAlias.
[Tue Mar 29 19:19:04.577220 2016] [alias:warn] [pid 1879] AH00671: The Alias directive in /usr/local/nagiosgraph/etc/nagiosgraph-apache.conf at line 14 will probably never match because it overlaps an earlier Alias.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[ OK ]
nagios@nagios:~$
nagios@nagios:~$ sudo cat /etc/httpd/conf.d/* | grep 'nagiosgraph'
cat: /etc/httpd/conf.d/*: No such file or directory
I did have the allow all unhashed but i hashed it based off earlier posts
It isn't the allow all, but rather the exact words 'require all granted' that matter. That's the only thing that needs to be uncommented, not the rest of the stuff.
What OS are you running? If it's Debian / Ubuntu try -
nagios@nagios:~$ cat /usr/local/nagiosgraph/etc/* | grep 'nagiosgraph'
# access control for nagiosgraph
# dataset options for nagiosgraph
# group options for nagiosgraph
# arbitrary groupings of hosts and services to be displayed by nagiosgraph.
# host options for nagiosgraph
# labels for services and data in nagiosgraph.
# enable nagiosgraph CGI scripts
ScriptAlias /nagiosgraph/cgi-bin /usr/local/nagiosgraph/cgi-bin
<Directory "/usr/local/nagiosgraph/cgi-bin">
# enable nagiosgraph CSS and JavaScript
Alias /nagiosgraph "/usr/local/nagiosgraph/share"
<Directory "/usr/local/nagiosgraph/share">
# command to process nagios performance data for nagiosgraph
command_name process-service-perfdata-for-nagiosgraph
command_line /usr/local/nagiosgraph/bin/insert.pl
# nagiosgraph configuration file
# Location of output from nagiosgraph data processing
logfile = /usr/local/nagiosgraph/var/log/nagiosgraph.log
# Location of output from nagiosgraph CGI scripts
cgilogfile = /usr/local/nagiosgraph/var/log/nagiosgraph-cgi.log
rrddir = /usr/local/nagiosgraph/var/rrd
mapfile = /usr/local/nagiosgraph/etc/map
nagiosgraphcgiurl = /nagiosgraph/cgi-bin
# JavaScript: URL to the nagiosgraph javascript file.
javascript = /nagiosgraph/nagiosgraph.js
# Stylesheet: URL to the nagiosgraph stylesheet.
stylesheet = /nagiosgraph/nagiosgraph.css
labelfile = /usr/local/nagiosgraph/etc/labels.conf
#hostdb = /etc/nagiosgraph/hostdb.conf
#servdb = /etc/nagiosgraph/servdb.conf
#groupdb = /etc/nagiosgraph/groupdb.conf
datasetdb = /usr/local/nagiosgraph/etc/datasetdb.conf
# The authorization method can be one of nagios3 or nagiosgraph. If no
# Nagios3 defaults to use authentication. nagiosgraph looks for the
# If authentication is enabled, nagiosgraph looks for the
# For access control via nagiosgraph, specify a single access control file.
#authzmethod = nagiosgraph
#authzfile = /etc/nagiosgraph/access.conf
# Set this to hide the nagiosgraph title (useful when nagiosgraph is
#rrdoptsfile=/etc/nagiosgraph/rrdopts.conf
# the nagiosgraph data processing interval.
# nagiosgraph auf deutsch
# nagiosgraph en espanol
# nagiosgraph en frances
# process nagios performance data using nagiosgraph
service_perfdata_file_processing_command=process-service-perfdata-for-nagiosgraph
$CFGNAME = 'nagiosgraph.conf';
NAGIOSGRAPHURL => 'http://nagiosgraph.sourceforge.net/',
# nagiosgraph.js file. change this number when the javascript is not
JSMISSING => 'nagiosgraph.js is not installed or wrong version.',
$cgi->start_html(-id => 'nagiosgraph',
} elsif ( $Config{authzmethod} eq 'nagiosgraph' ) {
return 'nagiosgraph_' . $key . '.conf';
my $action = $Config{nagiosgraphcgiurl} . q(/) . $script{$context};
my $url = $Config{nagiosgraphcgiurl} . '/showgraph.cgi?'
$rval .= $cgi->start_html(-id => 'nagiosgraph',
-title => "nagiosgraph: $opts->{title}",
my $worklog = $fn . '.nagiosgraph';
ngshared.pm - shared subroutines for the nagiosgraph programs
ngshared.pm uses B<nagiosgraph.conf> for most configuration. ngshared.pm also includes subroutines to read from B<hostdb.conf>, B<servdb.conf>, B<groupdb.conf>, and B<rrdopts.conf> files. These files are typically located in /etc/nagiosgraph.
Copy this file into a configuration directory (/etc/nagiosgraph, for example) and modify the B<use lib> line in each *.cgi file to the directory.
Alan Brenner - [email protected]; I've updated this from the version at http://nagiosgraph.wiki.sourceforge.net/ by moving some subroutines into this shared file (ngshared.pm) for use by insert.pl and the show*.cgi files.
# rrd options for nagiosgraph
# service options for nagiosgraph
nathanplatt wrote:nagios@nagios:~$ cat /etc/apache2/conf.d/* | grep 'nagiosgraph'
cat: /etc/apache2/conf.d/*: No such file or directory
nagios@nagios:~$
its ubuntu 14, server edition
i added the Require all granted to conf file and restarted apache2 same error
Where is your apache installed? You'll want to run that command against the folder that contains your apache configuration.
Additionally, the command you ran worries me as it's finding the apache configuration in your nagiosgraph install directory. Do you have this file referenced to include from apache?
├── ports.conf
├── sites-available
│ ├── 000-default.conf
│ ├── default-ssl.conf
│ └── otrs.conf
└── sites-enabled
├── 000-default.conf -> ../sites-available/000-default.conf
├── nagios.conf
├── nagiosgraph.conf
└── otrs.conf -> ../sites-available/otrs.conf
6 directories, 186 files
nagios@nagios:/etc/apache2$ cd sites-available/
nagios@nagios:/etc/apache2/sites-available$ ls
000-default.conf default-ssl.conf otrs.conf
nagios@nagios:/etc/apache2/sites-available$ cd ..
nagios@nagios:/etc/apache2$ cd sites-enabled/
nagios@nagios:/etc/apache2/sites-enabled$ nano nagiosgraph.conf
nagios@nagios:/etc/apache2/sites-enabled$ rm nagiosgraph.conf
rm: remove write-protected regular file ‘nagiosgraph.conf’? sudo rm nagiosgr
nagios@nagios:/etc/apache2/sites-enabled$ ls
000-default.conf nagios.conf nagiosgraph.conf otrs.conf
nagios@nagios:/etc/apache2/sites-enabled$ sudo su
root@nagios:/etc/apache2/sites-enabled# rm nagiosgraph.conf
root@nagios:/etc/apache2/sites-enabled# ls
000-default.conf nagios.conf otrs.conf
root@nagios:/etc/apache2/sites-enabled# service apache2 restart
* Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[ OK ]
root@nagios:/etc/apache2/sites-enabled#
Okay so i found the apache2 error but i may have just put us back to square one. I found that due to the multiple attempts to fix this on my own, i had a nagiosgraph.conf in the sites-enabled folder, so this is where the duplicate was being created from. Deleted this and now apache2 restarts fine.
I'm guessing from your previous comment that the share folder is probably in the wrong location.
I am still seeing the error, i deleted the one from the site-enabled folder to stop the error happening. Currently that folder only has the default site and nagios in it.