| Documentation for NagiosQL 2.x |
|
|
|
| Written by rouven |
| Friday, 28 March 2008 23:05 |
NagiosQL Documentation Requirements
InstallationHTML_Template_ITPear modules can be installed automatically by invoking the following command (requires internet access): # pear install HTML_Template_IT NagiosQLDownload and DecompressDownload latest NagiosQL Version from www.nagiosql.org and decompress the nagiosql-*.tar.gz to a directory accessible by your webserver (e.g. /srv/www/htdocs). A subdirectory "nagiosQL" will be created: # cd /srv/www/htdocs/ MySQLCreate the MySQL database by invoking the following command. The MySQL script automatically creates a new database with the name db_nagiosql_v2, all tables as well as the user "nagiosqlusr" with the password "nagiosqlpwd". # cd /srv/www/htdocs/nagiosQL/config In our example we use a database user "root" with password "xxxx". For security reasons we strongly advice to set a new password for the user: # mysql -uroot -p ConfigurationApache1. By using the provided .htaccess file For .htaccess files it is required to have AllowOverride set to All in your Apache configuration: <Directory /srv/www/htdocs/nagiosQL> 2. or by amending the Apache configuration (RECOMMENDED!) Just add the following entry to your Apache configuration: <Directory /srv/www/htdocs/nagiosQL> In case of changes to the apache configuration you need to reload your apache server. SECURITY: You have two options to secure your configuration files (*.ini). .htaccess files should be used in a case where the content providers need to make configuration changes to the server on a per-directory basis, but do not have root access on the server system. However, in general, use of .htaccess files should be avoided when possible. Any configuration that you would consider putting in a .htaccess file, can just as effectively be made in a <Directory> section in your main server configuration file. Please check if your server is secure by trying to download your own configuration http://www.domain.tld/nagiosQL/config/settings.ini If you can see the file, your configuration is not secure! PHPNagiosQL requires to have 'magic_quotes_gpc = On' in your php.ini Directory StructureIt is required to have the following directory structure (you can change the directory names in your NagiosQL settings.ini): /etc/nagios/ -> Common configuration files NagiosIn order to find the configuration files generated by NagiosQL your Nagios configuration must be amended, too. You are free to change the directory names, but be sure to do that in both configuration files (Nagios: nagios.cfg, NagiosQL: settings.ini). The directory structure (e.g. backup dirs below main dir) should never be changed! The Nagios configuration file nagios.cfg must be amended as follows: cfg_file=/etc/nagios/contactgroups.cfg PermissionsThe following file permissions are required to let NagiosQL read and write the Nagios configuration files. In our example the Apache runs as user "wwwrun" and the group "www" as well as Nagios runs by the user "nagios" and the group "daemon". The configuration files are located at /etc/nagios. Please amend if this differs from your installation. # chmod 6755 /etc/nagios If these directories already have files, amend the permissions for them, too: # chmod 644 /etc/nagios/hosts/*.cfg The Nagios binary must be executable by the Apache user: # chown nagios.www /usr/sbin/nagios Be sure the Apache user is able to write the Nagios commandfile. Please check your nagios.cfg for the correct path to the commandfile! # chown nagios.www /usr/local/nagios/var/rw/nagios.cmd Verify Installation and ConfigurationPlease check http://www.domain.tld/nagiosQL/testQL.php for possible errors. Running NagiosQL Now you should be able start NagiosQL: http://www.domain.tld/nagiosQL/index.php The first login can be done with the following user: Username: admin SECURITY: The first thing to do is to set a new password for admin!!! |
| Last Updated on Friday, 28 March 2008 23:20 |