aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/observium/files/pkg-message.in
blob: 5e6eba0c5dec70840ea09d3379d35f9a88c24209 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
=== Configuration details ===
You can mostly follow the guide at:
http://observium.org/wiki/Installation

with the following notes:
- Installation directory is %%WWWDIR%%
- The following lines should be added to /etc/crontab:

33	*/6	*	*	*	www	cd %%WWWDIR%% && %%PHP%% discovery.php -h all
*/5	*	*	*	*	www	cd %%WWWDIR%% && %%PHP%% discovery.php -h new
*/5	*	*	*	*	www	cd %%WWWDIR%% && %%PHP%% poller.php -h all
*/5	*	*	*	*	www	cd %%WWWDIR%% && %%PYTHON%% poller-wrapper.py 2

Notes:

- With newer MySQL databases you may need to disable strict mode for
  Observium to function:

	SET GLOBAL sql_mode = '';

- Apache needs mod_rewrite enabled; uncomment the line below in httpd.conf as needed.

    LoadModule rewrite_module libexec/apache24/mod_rewrite.so

- A minimal install can be created with the following steps and configuration file:

0: make sure apache and mysql are up and running.

1: create the database and a dbaccount with the following (my)SQL commands:

    CREATE DATABASE observium DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost' IDENTIFIED BY 'notSecure';
    SET GLOBAL sql_mode = '';

2: create a minimal config file at:

	 %%WWWDIR%%/config.php

    containing:

<?php
$config['db_host'] = 'localhost';
$config['db_user'] = 'observium';
$config['db_pass'] = 'notSecure';
$config['db_name'] = 'observium';

3:  populate the admin user and initialize the database (as 'www' user):

sudo -u www %%WWWDIR%%/discovery.php -u
sudo -u www %%WWWDIR%%/adduser.php admin SomeInsecureAdminPassword 10

4:   and verify that collection is working:

sudo -u www %%WWWDIR%%/discovery.php -h all -d
sudo -u www %%WWWDIR%%/poller.php -h all -d

5: Install the above crontabs.

6: Edit the file

   %%PREFIX%%/%%APACHEETCDIR%%/Includes/observium.conf
   
   and fill out a port number and hostname. 

7: restart the webserver with 

       apachectl restart

   or stop/start if in case of IP or SSL changes.

6: log in with a web browser; using the username 'admin' and the
   password 'SomeInsecureAdminPassword'.

   Hosts can be added from the webinterface or from the commandline.