Skip to content

Latest commit

 

History

History
112 lines (84 loc) · 4.8 KB

README.md

File metadata and controls

112 lines (84 loc) · 4.8 KB

cygnus-common

Content:

Welcome to cygnus-common

cygnus-common is the base for any Cygnus agent (e.g. cygnus-ngsi). Cygnus agents are based on Apache Flume agents, which are basically composed of a source in charge of receiving the data, a channel where the source puts the data once it has been transformed into a Flume event, and a sink, which takes Flume events from the channel in order to persist the data within its body into a third-party storage.

cygnus-common provides a set of extensions for Apache Flume, for instance, defining how a Http source handler must look like or adding channels suitable for reading Cygnus-like counters. But not only Flume extensions, but interesting functionality for any agent in terms of a common Management Interface, common backend classes for HDFS, MySQL, MongoDB, PostgreSQL and many others, unified logging classes and error handling, etc.

Top

Basic operation

Hardware requirements

  • RAM: 1 GB, specially if abusing of the batching mechanism.
  • HDD: A few GB may be enough unless the channel types are configured as FileChannel type.

Top

Installation (CentOS/RedHat)

Simply configure the FIWARE release repository if not yet configured:

sudo wget -P /etc/yum.repos.d/ https://nexus.lab.fiware.org/repository/raw/public/repositories/el/7/x86_64/fiware-release.repo

And use your applications manager in order to install the latest version of cygnus-common:

sudo yum install cygnus-common

The above will install cygnus-common in /usr/cygnus/.

Top

Configuration

Configuring cygnus-common is just configuring Apache Flume since no agent-related functionality is added (that's something agents as cygnus-ngsi do). Please, check this official guidelines.

Top

Running

cygnus-common can be run as a service by simply typing:

$ service cygnus-common start

Logs are written in /var/log/cygnus/cygnus.log, and the PID of the process will be at /var/run/cygnus/cygnus_1.pid.

Top

Unit testing

Running the tests require Apache Maven installed and cygnus-common sources downloaded.

$ git clone https://github.com/telefonicaid/fiware-cygnus.git
$ cd fiware-cygnus/cygnus-common
$ mvn test

Top

Management API overview

Run the following curl in order to get the version (assuming cygnus-common runs on localhost):

$ curl -X GET "http://localhost:8081/v1/version"
{
    "success": "true",
    "version": "0.12.0_SNAPSHOT.52399574ea8503aa8038ad14850380d77529b550"
}

Many other operations, like getting/setting the log level, can be found in Management Interface documentation.

Top

Further reading

Further information can be found in the documentation at fiware-cygnus.readthedocs.io

Top

Features summary

Management InterfaceGET /version0.5.0
GET /stats0.13.0
GET /groupingrules0.13.0
POST /groupingrules0.13.0
PUT /groupingrules0.13.0
DELETE /groupingrules0.13.0
Flume extensionsRoundRobinChannelSelector0.6.0
CygnusMemoryChannel0.13.0
CygnusHandler0.14.0
CygnusSink0.14.0
OperationRPM building framework0.3.0
TDAF-like logs0.4.0
Multi-instances0.7.0
start/stop/status per instance0.7.1
Ordered death of Cygnus0.8.0
Polling interval parameter0.8.0

Top

Reporting issues and contact information

Any doubt you may have, please refer to the Cygnus Core Team.

Top