|
Packit |
1422b7 |
How to install
|
|
Packit |
1422b7 |
==============
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
Here you can find the first steps to install and try liblognorm.
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
Getting liblognorm
|
|
Packit |
1422b7 |
------------------
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
There are several ways to install libognorm. You can install it
|
|
Packit |
1422b7 |
from your distribution, if it is there. You can get binary packages from
|
|
Packit |
1422b7 |
Rsyslog repositories:
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
- `RedHat Enterprise Linux or CentOS <http://www.rsyslog.com/rhelcentos-rpms/>`_
|
|
Packit |
1422b7 |
- `Ubuntu <http://www.rsyslog.com/ubuntu-repository/>`_
|
|
Packit |
1422b7 |
- `Debian <http://www.rsyslog.com/debian-repository/>`_
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
Or you can build your own binaries from sources. You can fetch all
|
|
Packit |
1422b7 |
sources from git (below you can find all commands you need) or you can
|
|
Packit |
1422b7 |
download it as tarballs at:
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
- `libestr <http://libestr.adiscon.com/download/>`_
|
|
Packit |
1422b7 |
- `liblognorm <http://www.liblognorm.com/download/>`_
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
Please note if you compile it from tarballs then you have to do the same
|
|
Packit |
1422b7 |
steps which are mentioned below, apart from::
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
$ git clone ...
|
|
Packit |
1422b7 |
$ autoreconf -vfi
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
Building from git
|
|
Packit |
1422b7 |
-----------------
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
To build liblognorm from sources, you need to have
|
|
Packit |
1422b7 |
`json-c <https://github.com/json-c/json-c/wiki>`_ installed.
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
Open a terminal and switch to the folder where you want to build
|
|
Packit |
1422b7 |
liblognorm. Below you will find the necessary commands. First, build
|
|
Packit |
1422b7 |
and install prerequisite library called **libestr**::
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
$ git clone git://git.adiscon.com/git/libestr.git
|
|
Packit |
1422b7 |
$ cd libestr
|
|
Packit |
1422b7 |
$ autoreconf -vfi
|
|
Packit |
1422b7 |
$ ./configure
|
|
Packit |
1422b7 |
$ make
|
|
Packit |
1422b7 |
$ sudo make install
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
leave that folder and repeat this step again for liblognorm::
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
$ cd ..
|
|
Packit |
1422b7 |
$ git clone git://git.adiscon.com/git/liblognorm.git
|
|
Packit |
1422b7 |
$ cd liblognorm
|
|
Packit |
1422b7 |
$ autoreconf -vfi
|
|
Packit |
1422b7 |
$ ./configure
|
|
Packit |
1422b7 |
$ make
|
|
Packit |
1422b7 |
$ sudo make install
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
That’s all you have to do.
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
Testing
|
|
Packit |
1422b7 |
-------
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
For a first test we need two further things, a test log and the rulebase.
|
|
Packit |
1422b7 |
Both can be downloaded `here
|
|
Packit |
1422b7 |
<http://blog.gerhards.net/2010/11/log-normalization-first-results.html>`_.
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
After downloading these examples you can use liblognorm. Go to
|
|
Packit |
1422b7 |
liblognorm/src and use the command below::
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
$ ./lognormalize -r messages.sampdb -o json
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
where::
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
-r = path to the rulebase
|
|
Packit |
1422b7 |
-o = output format
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
Please have look at :doc:`lognormalizer` for all available options.
|