Any Cygnus agent is configured through two different files:
cygnus_instance_<id>.conffile addressing all those non Flume parameters, such as the Flume agent name, the specific log file for this instance, the administration port, etc. This configuration file is not necessary if Cygnus is run as a standalone application (see later), but it is mandatory if run as a service (see later).
agent_<id>.conffile addressing all those Flume parameters, i.e. how to configure the different sources, channels, sinks, etc. that compose the Flume agent behind the Cygnus instance. It is always mandatory.
Please observe there may exist several Cygnus instances identified by
<id>, and this
<id> must be the same for both configuration files regarding the same Cygnus instance. This is necessary if wanting to run several instances of Cygnus as a service in the same machine. E.g. running two different instances of Cygnus will require:
- First instance:
- Second instance:
In addition, (a unique)
log4j.properties controls how Cygnus logs its traces.
cygnus_instance_<id>.conf can be instantiated from a template given in the Cygnus repository,
# The OS user that will be running Cygnus. Note this must be `root` if you want to run cygnus in a privileged port (<1024), either the admin port or the port in which Cygnus receives Orion notifications CYGNUS_USER=cygnus # Which is the config folder CONFIG_FOLDER=/usr/cygnus/conf # Which is the config file CONFIG_FILE=/usr/cygnus/conf/agent_<id>.conf # Name of the agent. The name of the agent is not trivial, since it is the base for the Flume parameters naming conventions, e.g. it appears in <AGENT_NAME>.sources.http-source.channels=... AGENT_NAME=cygnus-common # Name of the logfile located at /var/log/cygnus. It is important to put the extension '.log' in order to the log rotation works properly LOGFILE_NAME=cygnus.log # Administration port. Must be unique per instance ADMIN_PORT=8081 # Polling interval (seconds) for the configuration reloading POLLING_INTERVAL=30
As you can see, this file allows configuring the log file. For a detailed logging configuration, please check the
agent_<id>.conf can be instantiated from a template given in the Cygnus repository,
While no specific Cygnus agent is used, this template is just the Apache Flume template.