Installation Process Overview
There are three main components to Kontrollbase. The webapp, the client scripts, and the server scripts. Each component needs to be installed in a specific sequence.- If you have a large database environment you might be interested in the ability to add hosts in bulk. If that is the case please see this page.
- If you are scaling your environment by splitting the webapp and the backend MySQL database onto separate servers, see this page.
Note: You only have to setup the Webapp and the Server Scripts one time, but you do have to setup the Client Script on each client host that you want to be monitored.
Reference: Location of Files
Here is a brief explanation of where the files are that you will be dealing with. You'll see these once you download the application tar.gz file and then unpack it. Naming conventions example: $root/bin/kontroll-stats-gather-5.0.x_linux-x86.pl- $root is the main directory of the unpacked application. ex: kontrollbase-2.0.1
- "5.0.x" references that the script is intended for the various MySQL versions 5.0. Other options include 5.1 and 4.1 if those scripts are included with the software distribution. Currently the 5.0 script works with 5.1 versions and 4.x is not supported.
- "linux" refers to the operating system the script supports, in this case Linux. Other options would be solaris, windows, aix, etc. You would need to choose the correct client script based on the operating system your client server runs.
- "x86" is the processor architecture. In this case x86 supports the Intel/Amd i386 32bit and 64bit architectures. Other choices would be ppc, sparc, power, etc.
- "$release" refers to the version of Kontrollbase, like 2.0.1
- system/cache -> this needs to be writeable by the webserver process user.
- system/logs -> this needs to be writeable by both the webserver and the kontrollbase script user.
- system/application/config -> this needs to be writeable by the webserver process user.
- includes/ -> this needs to be writeable by the webserver process user.
- includes/pages -> this needs to be writeable by the webserver process user.
- Pre-requisite check script. Run this prior to installing anything to ensure you have the required modules for perl and php installed.
- $root/bin/kontroll-check_reqs.php
- Webapp files
- MVC database config: $root/system/application/config/database.php
- MVC general config: $root/system/application/config/config.php
- initial schema (sql file): $root/sql/kontrollbase-schema-$release.sql
- user guide: $root/userguide
- Client files
- client script (called by looper): $root/bin/kontroll-client-5.0.x_linux-x86.pl
- Server scripts
- reporting script (cron hourly): $root/bin/kontroll-reporter-5.0.x_linux-x86-$release.pl
- host polling looper (cron 5 minutes): $root/bin/kontroll-server_loop-5.0.x_linux-x86-$release.pl
- alert processor (cron 5 minutes): $root/bin/kontroll-alerter-5.0.x_linux-x86-$release.pl
- XML statistics processor (called by looper): $root/bin/kontroll-stats-gather-5.0.x_linux-x86-$release.pl
Checking requirements
Before you do anything you will want to run the pre-requisite check script that looks for various PHP and Perl modules to see if they are installed. You need all of the required modules to be found by this script or the application will fail to run. You can find the script in the $root/bin/ directory and it is run as follows:shell> php kontroll-check_reqs.php
Starting...
Beggining PHP prerequisite checks
Prerequisite dom located
Prerequisite mbstring located
Prerequisite mysql located
Prerequisite xml located
All required PHP modules are available.
Beginning Perl prerequisite checks
Prerequisite XML/Parser.pm located
Prerequisite XML/SimpleObject.pm located
Prerequisite DBI.pm located
Prerequisite /Math/Calc/Units.pm located
All required Perl modules are available.
The Simplest Method for Installing Requirements
The easiest way to do this is to use Redhat/Centos for your server. This is because RPMforge has all of the required modules as RPM files. You may find that Ubuntu/Debian has most or all of the packages in their various repositories but we don't keep very up to date on that platform since most enterprise servers that we encounter run Redhat and, as such, the application is built and developed on that OS. So, here are the instructions for the quickets method of installing all required dependencies.Install the RPMforge repository RPM for your particular OS
This is required since most of the RPMs are not found in the standard OS repositories.http://dag.wieers.com/rpm/FAQ.php#B
Install MySQL client and server
Not required if you are installing MySQL from alternate meansyum -y install mysql mysql-server
Install Apache and PHP requirements
You might already have Apache installed but you may not have the other PHP modules installed.yum -y install httpd php php-mysql php-mbstring php-xml
Install Perl and Perl modules requirements
You probably already have Perl installed but you definitely need the other modules.yum -y install perl perl-DBD-mysql perl-DBI perl-Digest-HMAC perl-XML-LibXML perl-XML-Simple perl-XML-Parser perl-XML-SimpleObject perl-XML-LibXML-Common perl-Crypt-DES perl-Math-Calc-Units perl-Net-SNMP
For Reporter-CLI functionality if desired
yum -y install sqlite perl-DBD-SQLite
Check that all requirements are met
Go to the bin/ directory and run the php script for checking requirements.ROOT-(root@localhost)-(/usr/local/src/kontrollbase-read-only/bin)-ROOT
ROOT-(0)> php ./kontroll-check_reqs.php
Starting...
Beggining PHP prerequisite checks
Prerequisite dom located
Prerequisite mbstring located
Prerequisite mysql located
Prerequisite xml located
All required PHP modules are available.
Beginning Perl prerequisite checks
Prerequisite XML/Parser.pm located
Prerequisite XML/SimpleObject.pm located
Prerequisite DBI.pm located
Prerequisite /Math/Calc/Units.pm located
All required Perl modules are available.
Webapp Installation
The webapp is simply the visual interaction with the application. Think of it as the display layer that makes all of the data able to be used and interpreted.It offers the following features
- Overall environment (all servers) graphs of historical data
- Overall data summary reporting
- Overall critical alerts - non critical alerts are featured on a per-host basis to keep the overall environment interface clean
- Overall RSS feeds for data and alerts
- Per-host graphing, including over 50 graphs for very detailed visual analysis
- Per-host alerts - featuring crital,warning,information level alert states
- Per-host performance and security tuning reports
- Per-host RSS feeds for data and alerts
- Per-host monitoring of replication status if server is setup as a slave
- Tiered authentication levels: client, standard, admin
- Admin functions: add/edit/delete hosts, clients, application users
- System management: alert email templates, system email address, etc
- And much more
- Download the tar.gz file and then decompress the Kontrollbase tar.gz file into your webroot directory.
- I recommend installing the program to /var/www/html/kontrollbase on Redhat or /var/www/kontrollbase on Ubuntu/Debian.
- See this page for full instructions.
Client Script Installation
The client scripts are installed on a per-host basis. This means that each client host has it's own copy of the client script. There is only one file needed on each client host so the process is relatively simple. The added bonus is that this process can be scripted to automate installation across multiple servers - if you are familiar with automation scripting that is :)The client scripts gather the following data from the client server
- OS load: 1,5,15 minute
- OS Swap: total, free
- OS RAM: total, used
- OS CPU: user,system,idle
- MySQL: user information - security profiling
- MySQL: all global variables
- MySQL: all global status information
- MySQL: process/connections count
- MySQL: table and schema statistics
- MySQL: engine statistics
- MySQL: configuration (cnf) file
- Redhat, Fedora, Centos: click here
- Ubuntu, Debian: click here
- Other: click here
- Experimental: click here
Server Scripts Installation
The server scripts are the backend code that provides the life-blood of Kontrollbase. Without these scripts running at periodic intervals we won't have any data to display for your client servers. They're the worker ants in the equation. Written in Perl, they provide the following services:- Data collection from client servers
- Data analytics processing
- Report generation for performance and security tuning.