Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/CESNET/nemea
Browse files Browse the repository at this point in the history
  • Loading branch information
cejkato2 committed Feb 16, 2016
2 parents a96f67e + dce4aaf commit 306a583
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 30 deletions.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ NEMEA System

Travis CI build: [![Build Status](https://travis-ci.org/CESNET/Nemea.svg?branch=master)](https://travis-ci.org/CESNET/Nemea)

The Nemea system consists of:
* [Nemea framework](https://github.com/CESNET/Nemea-Framework): The heart of the system that provides interconnection of modules, data format (and its handling) and common functions, algorithms and data structures.
* [Nemea modules](https://github.com/CESNET/Nemea-Modules): Base modules of the system for export&storage of flow data, replay of stored flow data, filtering, merging, and others. It also contains a basic flow exporter capable of L7 information.
* [Nemea detectors](https://github.com/CESNET/Nemea-Detectors): Detection modules that can detect and report various types of malicious traffic such as DoS, DDoS, scanning, bruteforce attacks.
* [Nemea Supervisor](https://github.com/CESNET/Nemea-Supervisor): Central management and monitoring module of the Nemea system. It takes care of running modules according to configuration.

This file describes the installation and basic usage of the Nemea system.
To see more general information, please have a look at
https://www.liberouter.org/nemea.
Expand Down Expand Up @@ -30,8 +36,7 @@ be supplied soon.
Source Codes installation
-------------------------

The Nemea system consists of the [Nemea framework](cejkato2/Nemea-Framework), Nemea modules (basic and detection) and Nemea Supervisor. The whole system
is based on GNU/Autotools build system that makes dependency checking and
The whole system is based on GNU/Autotools build system that makes dependency checking and
building process much more easier.

To clone the read-only repositories, use:
Expand Down Expand Up @@ -89,10 +94,10 @@ that can be connected with each other. Information about every module can be fou
```
Every Nemea module can have one or more communication interfaces (IFC) implemented in
[libtrap](./nemea-framework/libtrap). There are two types of IFCs: **input** and **output**. Numbers of module's IFCs
[libtrap](https://github.com/CESNET/Nemea-Framework/tree/master/libtrap). There are two types of IFCs: **input** and **output**. Numbers of module's IFCs
can be found in its help.
At the beginning, let's try the `logreplay` module ([./modules/logreplay](./modules/logreplay)).
At the beginning, let's try the `logreplay` module ([modules/logreplay](https://github.com/CESNET/Nemea-Modules/tree/master/logreplay)).
The help output shows that `logreplay` has one output IFC:
```
Name: LogReplay
Expand All @@ -103,7 +108,7 @@ Description:
of CSV file has to be data format of fields.
```
The complement module is `logger` ([./modules/logger](./modules/logger)), help output:
The complement module is `logger` ([modules/logger](https://github.com/CESNET/Nemea-Modules/tree/master/logger)), help output:
```
Name: Logger
Inputs: variable
Expand All @@ -119,7 +124,7 @@ Description:
Two modules can be interconnected using one input IFC and one output IFC.
The [./use-cases](./use-cases) directory contains example scripts that demonstrate usage and functionality of
Nemea modules. `logreplay` and `logger` can be found in [logger-repeater.sh](./use-cases/logger-repeater.sh).
Nemea modules. `logreplay` and `logger` can be found in [./use-cases/logger-repeater.sh](./use-cases/logger-repeater.sh).
Start the script to see how flow records are replayed from CSV file by `logreplay` and received by `logger`:
```
cd use-cases
Expand All @@ -131,7 +136,7 @@ To get usage of scripts from `use-cases`, execute a script without parameter. Th
scripts.
`logreplay` is one of possible ways of getting data into the Nemea system.
There is a [nfreader](./modules/nfreader) module that is able to read and replay `nfdump` files.
There is a [nfreader](https://github.com/CESNET/Nemea-modules/tree/master/nfreader) module that is able to read and replay `nfdump` files.
Last but not least, there is an [ipfixcol](https://github.com/CESNET/ipfixcol/) with [ipfixcol2unirec](https://github.com/CESNET/ipfixcol/tree/master/plugins/storage/unirec)
that is capable of exporting flow data in UniRec format and sending it via libtrap IFC.
Expand All @@ -142,7 +147,7 @@ The Nemea system can be managed and monitored by a special module called
[Supervisor](https://github.com/CESNET/Nemea-Supervisor).
Some modules that are contained in Nemea-Modules and Nemea-Detectors provide their default
configuration in [https://github.com/CESNET/Nemea-Supervisor/tree/master/configs/](nemea-supervisor/configs/).
configuration in [nemea-supervisor/configs/](https://github.com/CESNET/Nemea-Supervisor/tree/master/configs/).
To use prepared configuration, run `make` in `nemea-supervisor/configs` and start:
```
nemea-supervisor/supervisor -f nemea-supervisor/configs/supervisor_config.xml
Expand Down
28 changes: 18 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,27 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([nemea], [2.1.0], [[email protected]])
AC_INIT([nemea], [2.2.1], [[email protected]])
AM_INIT_AUTOMAKE([foreign subdir-objects])
RELEASE=1
AC_SUBST(RELEASE)
USERNAME=`git config --get user.name`
USERMAIL=`git config --get user.email`
AC_SUBST(USERNAME)
AC_SUBST(USERMAIL)
# Check for rpmbuild
AC_CHECK_PROG(RPMBUILD, rpmbuild, rpmbuild, [""])

# Checks for programs.
AC_SUBST(RPMBUILD)
if test -z "$RPMBUILD"; then
AC_MSG_WARN([Due to missing rpmbuild you will not able to generate RPM package.])
fi

# Checks for libraries.
RPM_RELEASE=1
AC_SUBST(RPM_RELEASE)
AM_CONDITIONAL(MAKE_RPMS, test x$RPMBUILD != x)

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([Makefile
nemea.spec])
AC_CONFIG_SUBDIRS([nemea-framework nemea-supervisor modules detectors])
AC_OUTPUT
2 changes: 1 addition & 1 deletion nemea-framework
Submodule nemea-framework updated 61 files
+21 −0 Makefile.am
+12 −0 README.md
+1 −0 common/ChangeLog
+3 −3 common/b_plus_tree/README
+11 −11 common/b_plus_tree/b_plus_tree.c
+1 −1 common/configurator/configurator-internal.h
+1 −1 common/configure.ac
+6 −5 common/include/b_plus_tree.h
+18 −3 configure.ac
+221 −0 create_module.sh.in
+1 −0 examples/Makefile.am
+21 −0 examples/configure.ac
+5 −0 examples/module/Makefile.am
+11 −0 examples/module/README
+6 −0 examples/module/aminclude.am
+34 −0 examples/module/configure.ac
+171 −0 examples/module/example_module.c
+34 −0 examples/module/m4/ac_define_dir.m4
+68 −0 examples/module/m4/ax_libtrap_check.m4
+53 −0 examples/module/m4/ax_nemeacommon_check.m4
+532 −0 examples/module/m4/ax_prog_doxygen.m4
+332 −0 examples/module/m4/ax_pthread.m4
+78 −0 examples/module/m4/ax_unirec_check.m4
+1 −0 libtrap/ChangeLog
+0 −3 libtrap/Makefile.am
+1 −1 libtrap/configure.ac
+18 −18 libtrap/include/libtrap/trap_module_info.h
+1 −1 libtrap/src/trap.c
+1 −1 libtrap/tests/Makefile.am
+4 −5 libtrap/tests/test_buffering.c
+6 −6 libtrap/tests/test_echo.c
+5 −4 libtrap/tests/test_echo_ctx.c
+7 −8 libtrap/tests/test_echo_reply.c
+7 −8 libtrap/tests/test_echo_reply_ctx.c
+7 −7 libtrap/tests/test_multi_recv.c
+3 −2 libtrap/tests/test_trap_ifc_tcpip_server.c
+10 −0 pycommon/Makefile.am
+0 −0 pycommon/__init__.py
+278 −0 pycommon/report2idea.py
+15 −0 pycommon/setup.py
+2 −13 python/Makefile.am
+0 −0 python/__init__.py
+0 −2 python/bootstrap.sh
+0 −58 python/configure.ac
+0 −40 python/nemea-python.spec.in
+3 −1 python/python_example.py
+9 −7 python/setup.py
+22 −8 python/trap.py
+1 −5 python/unirec/Makefile.am
+9 −1 python/unirec/__init__.py
+152 −138 python/unirec/unirec.py
+11 −7 python/unirec/ur_ipaddr.py
+4 −0 python/unirec/ur_time.py
+78 −77 python/unirec/ur_types.py
+2 −0 unirec/ChangeLog
+1 −1 unirec/configure.ac
+3 −3 unirec/unirec.c
+9 −9 unirec/unirec.h
+1 −0 unirec/unirec.spec.in
+2 −11 unirec/unirec_generate_fields_files.py
+13 −7 unirec/ur_processor.sh
2 changes: 1 addition & 1 deletion nemea-supervisor
19 changes: 19 additions & 0 deletions nemea.spec.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Summary: Nemea system
Name: nemea
Version: @PACKAGE_VERSION@
Release: @RELEASE@
URL: http://www.liberouter.org/
#Source: https://www.liberouter.org/
Group: Liberouter
License: BSD
Vendor: CESNET, z.s.p.o.
Packager: @USERNAME@ <@USERMAIL@>
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
BuildArch: noarch
Requires: libtrap nemea-common nemea-modules nemea-detectors nemea-python nemea-pycommon nemea-supervisor

%description
Meta-package of the Nemea system, the distributed modular system for network traffic analysis and anomaly detection.

%files

27 changes: 19 additions & 8 deletions rpms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,37 +73,48 @@ export chuser
(
cd libtrap
su $chuser -p -c "$topdir/generate-rpm.sh"
$pkginst install -y -q ./RPM*/RPMS/*/*
$pkginst install -y -q $(find \( -name '*noarch.rpm' -o -name '*64.rpm' \))
)
(
cd common
su $chuser -p -c "$topdir/generate-rpm.sh"
$pkginst install -y -q ./RPM*/RPMS/*/*
$pkginst install -y -q $(find \( -name '*noarch.rpm' -o -name '*64.rpm' \))
)
(
cd unirec
su $chuser -p -c "$topdir/generate-rpm.sh"
$pkginst install -y -q ./RPM*/RPMS/*/*
$pkginst install -y -q $(find \( -name '*noarch.rpm' -o -name '*64.rpm' \))
)
(
cd python
su $chuser -p -c "$topdir/generate-rpm.sh"
$pkginst install -y -q ./RPM*/RPMS/*/*
su $chuser -p -c "python setup.py bdist_rpm"
$pkginst install -y -q $(find \( -name '*noarch.rpm' -o -name '*64.rpm' \))
)
(
cd pycommon
su $chuser -p -c "python setup.py bdist_rpm"
$pkginst install -y -q $(find \( -name '*noarch.rpm' -o -name '*64.rpm' \))
)
)
(
cd modules
su $chuser -p -c "$topdir/generate-rpm.sh"
$pkginst install -y -q ./RPM*/RPMS/*/*
$pkginst install -y -q $(find \( -name '*noarch.rpm' -o -name '*64.rpm' \))
)
(
cd detectors
su $chuser -p -c "$topdir/generate-rpm.sh"
$pkginst install -y -q ./RPM*/RPMS/*/*
$pkginst install -y -q $(find \( -name '*noarch.rpm' -o -name '*64.rpm' \))
)
(
cd nemea-supervisor
su $chuser -p -c "$topdir/generate-rpm.sh"
$pkginst install -y -q ./RPM*/RPMS/*/*
$pkginst install -y -q $(find \( -name '*noarch.rpm' -o -name '*64.rpm' \))
)

su $chuser -p -c "$topdir/bootstrap.sh >/dev/null 2>/dev/null&& $topdir/configure -q"
mkdir -p "`pwd`/RPMBUILD"
rpmbuild -ba nemea.spec --define "_topdir `pwd`/RPMBUILD"
mkdir -p "`pwd`/rpms"
find -name *.rpm -not -path "./rpms/*" -exec mv {} rpms/ \;

0 comments on commit 306a583

Please sign in to comment.