Jul
10
2009
0

Install NETWAYSGrapher V2 in Debian Lenny

A few steps are required to get NETWAYSGrapher V2 up and running in Debian Lenny. Especialy those missing Perl modules are annoying (I don’t like to have a dev environment on a server).

Here are the steps that I’ve taken to get NETWAYSGrapher V2 up and running.

WARNING: I suppose you’ve already installed Apache, Nagios and MySQL and everything is working!

1. Install required packages:

1
apt-get install php5 php-pear php5-xsl php5-gd php5-mysql php5-pdo libyaml-perl libyaml-syck-perl libcarp-assert-perl libclass-singleton-perl libclass-accessor-perl libsql-abstract-perl libparams-validate-perl liblog-dispatch-perl libset-crontab-perl libthreads-shared-perl libcache-fastmmap-perl libdbd-mysql-perl libuniversal-require-perl libterm-readkey-perl libproc-daemon-perl

2. Configure CPAN

1
perl -MCPAN -e shell

Let CPAN configure itself by answering ‘yes’ to the question.

3. Install additional CPAN modules

The following modules are missing in Debian Lenny repository or too old:
- Thread::Queue
- Thread::Cancel
- threads
- threads::shared
- Proc::Simple

I’ve created Debian packages which you can find here
You can also install those modules from CPAN.

4. Download NETWAYSGrapher V2

You can download NETWAYSGrapher V2 here
After downloading, extract the package.

1
tar xjf NETWAYSGrapherV2-2.0RC2.tar.bz2

5. Run collector dependencies check

Run the following commands:

1
2
cd <GRAPHERV2_SOURCE_DIR>/appkit/etc
../bin/phing test-collector-deps

If all went fine, you should see a message like

SUCCESS: All perl deps (modules) found!

6. Disable magic_quotes_gpc and run frontend dependencies check

Disabling magic_quotes_gpc:

1
2
sed -i 's/magic_quotes_gpc = On/magic_quotes_gpc = Off/' /etc/php5/apache2/php.ini
sed -i 's/magic_quotes_gpc = On/magic_quotes_gpc = Off/' /etc/php5/cli/php.ini

Running frontend dependencies check:

1
cd
1
<GRAPHERV2_SOURCE_DIR>
1
2
/appkit/etc
../bin/phing test-frontend-deps

If everything is working, you should see no error message, except missing PHP LDAP support, which is not required.

7. Edit build.properties and fit it to your needs

Run your favorite editor and edit

1
<GRAPHERV2_SOURCE_DIR>/appkit/etc/build.properties.

1
2
Change <em>perm.daemon-user</em> and <em>perm.daemon-group</em> to <em>nagios</em>.
Set <em>httpd.server_name</em> to <em>your server name</em>.

If your database is not running on the same host, edit the db-values, too.

8. Create database user

Make a connection to your database as root user and execute the following command:

1
2
GRANT ALL on ng2_db.* to ng2 identified by '&lt;yourRandomPassword&gt;';
GRANT SUPER on *.* to ng2;

9. Start installation

1
2
cd &lt;GRAPHERV2_SOURCE_DIR&gt;/appkit/etc
../bin/phing -Dproperties=&lt;ABSOLUTE_PATH_TO_build.properties&gt; install-all

10. Add it to Apache

In <GRAPHERV2_INSTALL_DIR>/appkit/etc/appkit_httpd.conf is a fully configured vhost config file.
Copy or link this file to /etc/apache2/sites-enabled and reload your apache.

After you’ve finished all steps, you can integrate NETWAYSGrapher V2 in Nagios.

If you have any questions, feel free to ask me.

Dec
14
2008
0

Debian, Nagios3 und Kommandos über das Web-Interface

Ich hatte heute das Problem, dass ich aus Nagios 3 unter Debian Lenny kein Kommando über das Web-Interface abschicken konnte.

Ich wurde von folgender Fehlermeldung beglückt:

Error: Could not stat() command file ‘/var/lib/nagios3/rw/nagios.cmd’!

Tief in meinem Kopf war auch die Lösung noch vorhanden, allerdings war sie nicht mehr ganz so bewusst. Auf jeden Fall war mir klar, dass es sich um ein Rechteproblem handelt. Wenn ich den Benutzer www-data (unter welchem Apache läuft) in die Nagios-Gruppe aufgenommen hätte, wäre das Problem gelöst. Allerdings ist das nicht der Debian-Weg.

Nach einer kurzen Suche im Web fand ich diesen Blogeintrag.

Kurz nochmal die zwei Befehle:

1
2
dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3

Dann Nagios neu starten und die Sache hat sich.

Written by saz in: Debian,Linux,Nagios | Tags: , , ,

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com