-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathINSTALL
43 lines (27 loc) · 2.06 KB
/
INSTALL
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
Installing ogslb
Requirements:
python
powerdns
Optional:
redis
python-redis
Install:
By default, ogslb lives under /opt/ogslb but it can be placed anywhere. Simply edit 'etc/config.xml' to point to the correct paths.
There are two different backend databases ogslb is able to use: redis and sqlite. The redis database has been tested the longest but the sqlite backend removed dependancies on additional applications. Right now, the selection of the backend is very rudimentary (though this should change as additional backends are more tested). A pair of symlinks are needed to select a particular backend. Under the lib director, TimeSeries.py and Stats.py need to point to the correct version:
ln -s TimeSeries_redis.py TimeSeries.py
ln -s Stats_redis.py Stats.py
Additional configuration for backends is managed in 'etc/config.xml' under the <BACKEND> section.
Powerdns needs to be configured to use the ogslb backend. Typically, ogslb will be configured to handle requests first in powerdns and if it doesn't have any matching data, the request will fall through to the next available backend such as bind style zone files. Additionally, you will typically want to disable caching of dns records in powerdns to make sure you have the latest version of data from ogslb.
Powerdns config (often /etc/pdns/pdns.conf):
launch=pipe,bind # launch the backends in order of the ogslb pipe, then the bind zone files
pipe-command=/opt/ogslb/bin/backend.py # where the ogslb backend lives
cache-ttl=0 # and now we disable all of the caching
negquery-cache-ttl=0 #
query-cache-ttl=0 #
recursive-cache-ttl=0 #
Running:
Once powerdns is configured, it will need to be restarted to pick up the new ogslb backend.
Now, you will need to configure oglsb to tell it what to monitor. Take a look at the POLLERS text file to understand how to configure etc/pollers.xml.
Once etc/pollers.xml has been configured, simply start bin/ogslbd. The ogslb daemon logs to /var/log/ogslbd.log.
Testing:
You can use bin/view.py to get a basic idea of what has been collected by ogslbd and stored in redis.