Continuously monitors a set of log files and sends new data to the Amazon Kinesis Stream and Amazon Kinesis Firehose in near-real-time.
Continuously monitors a set of log files and sends new data to the Amazon Kinesis Stream and Amazon Kinesis Firehose in near-real-time.
The Amazon Kinesis Agent is a stand-alone Java software application that offers an easier way to collect and ingest data into Amazon Kinesis services, including Amazon Kinesis Streams and Amazon Kinesis Firehose.
[!IMPORTANT]
Please upgrade to Kinesis Agent version 2.0.12 to reduce the risk of potential log processing failures
We have discovered an issue in Kinesis Agent versions prior to 2.0.12 that may cause the log tailer thread to silently cease functioning. We strongly recommend upgrading Kinesis Agent to version 2.0.12 or later where this issue is resolved. For any additional questions or concerns, please reach out to AWS Support.
After you've downloaded the code from GitHub, you can install the Amazon Kinesis Agent with the following command:
# Optionally, you can set DEBUG=1 in your environment to enable massively
# verbose output of the script
sudo ./setup --installThis setup script downloads all the dependencies and bootstraps the environment for running the Java program.
After the agent is installed, the configuration file can be found in /etc/aws-kinesis/agent.json. You need to modify this configuration file to set the data destinations and AWS credentials, and to point the agent to the files to push. After you complete the configuration, you can make the agent start automatically at system startup with the following command:
sudo chkconfig aws-kinesis-agent onIf you do not want the agent running at system startup, turn it off with the following command:
sudo chkconfig aws-kinesis-agent offTo start the agent manually, use the following command:
sudo service aws-kinesis-agent startYou can make sure the agent is running with the following command:
sudo service aws-kinesis-agent statusYou may see messages such as aws-kinesis-agent (pid [PID]) is running...
To stop the agent, use the following command:
sudo service aws-kinesis-agent stopThe agent writes its logs to /var/log/aws-kinesis-agent/aws-kinesis-agent.log
To uninstall the agent, use the following command:
sudo ./setup --uninstallThe installation done by the setup script is only tested on the following OS Disributions:
For other distributions or platforms, you can build the Java project with the following command:
sudo ./setup --buildor by using Ant target as you would build any Java program:
ant [-Dbuild.dependencies=DEPENDENCY_DIR]If you use Ant command, you need to download all the dependencies listed in pom.xml before building the Java program. DEPENDENCY_DIR is the directory where you download and store the dependencies. By default, the Amazon Kinesis Agent reads the configuration file from /etc/aws-kinesis/agent.json. You need to create such a file if it does not already exist. A sample configuration can be found at ./configuration/release/aws-kinesis-agent.json
To start the program, use the following command:
java -cp CLASSPATH "com.amazon.kinesis.streaming.agent.Agent"CLASSPATH is the classpath to your dependencies and the target JAR file that you built from the step above.
No open issues yet, or sync has not completed.