Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: awslabs/amazon-kinesis-agent
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.1
Choose a base ref
...
head repository: awslabs/amazon-kinesis-agent
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Nov 12, 2015

  1. Copy the full SHA
    7bb13d4 View commit details

Commits on Apr 11, 2016

  1. Agent extensions library, plus data pre-processing extension support (#…

    …11)
    
    * Add amazon-kinesis-agent-extension dependency.
    Add gitignore file.
    
    * Add data conversion functionality to parser classes.
    
    * Implement converter test.
    
    * Fix example converter class name.
    
    * Fix build scripts (setup and ant).
    
    * Add script to manually run Kinesis Agent on older Linux versions.
    Add script to read N records from the stream, basically simplification for aws cli kinesis commands.
    Update Agent config with "initialPosition" options.
    
    * Fix K Stream reader script.
    
    * Better output for K Stream reader script
    
    * Fix K Agent manual runner: remove JAVA library directory from classpath.
    chupakabr authored and chaochenq committed Apr 11, 2016
    Copy the full SHA
    919f853 View commit details
  2. Copy the full SHA
    1f62dea View commit details

Commits on Apr 13, 2016

  1. .gitignore updates (#20)

    Willy Lulciuc authored and chaochenq committed Apr 13, 2016
    Copy the full SHA
    c1d2e63 View commit details
  2. Copy the full SHA
    6a88340 View commit details

Commits on Apr 22, 2016

  1. RFC3339 timestamps (#24)

    mattford63 authored and chaochenq committed Apr 22, 2016
    Copy the full SHA
    653bcf2 View commit details

Commits on May 20, 2016

  1. Initial support for installing the agent on Ubuntu hosts. (#27)

    * Initial support for installing the agent on Ubuntu hosts.
    
    This commit refactors the setup script so that its a little more
    idempotent, easier to read the output of the wget downloads, and now
    supports Ubuntu as well as RHEL/AmazonLinux.
    
    We also create a new Ubuntu-specific startup script thats vastly simpler
    than the RedHat/Amazon Linux script.
    
    * Re-order the build dependency search path.
    
    By passing in the build dependency search path with the system path
    first, if the system already has a library (like guava) installed thats
    older than the desired library, it is then loaded up during the build
    process and the downloaded dependency is ignored.
    diranged authored and chaochenq committed May 20, 2016
    Copy the full SHA
    7c96a1c View commit details

Commits on Jun 1, 2016

  1. Use rather than (#34)

    pcurry authored and chaochenq committed Jun 1, 2016
    Copy the full SHA
    12c2580 View commit details

Commits on Jun 14, 2016

  1. Copy the full SHA
    25ad291 View commit details

Commits on Jul 6, 2016

  1. fix permissions issue in RedHat startup script (#38)

    Running `mkdir -p` resulted in the `/var/run/aws-kinesis-agent`
    directory being created as root, but the aws-kinesis-agent-user user
    needs to have permissions to that directory. This change results in
    `aws-kinesis-agent-user` being the owner of the directory, instead of
    root.
    rsolomo authored and chaochenq committed Jul 6, 2016
    Copy the full SHA
    f51ff40 View commit details

Commits on Jul 14, 2016

  1. More ubuntu fixes... (#40)

    * Fix a few bugs in the Ubuntu init script
    
    * Dynamically find the 'service' command path in the babysit script
    
    * Leverate the actual init scripts for auto-restarting the agent if
    necessary.
    
    This is definitely simpler!
    
    * A few more Ubuntu init script bug fixes.
    
    Ensure that we error out on any failure, properly return an exit code.
    This makes sure that the updated cron job to sanity check the service
    works properly.
    
    * Set the CLASSPATH more safely -- ensure packaged JARs are used first!
    
    * Re-implement the babysit script, but with a small bugfix.
    
    The babysit script does indeed do usefull things (verifies that the
    service _should_ be running and then restarts it if its not).
    diranged authored and chaochenq committed Jul 14, 2016
    Copy the full SHA
    3e0a560 View commit details
  2. Copy the full SHA
    e13a17f View commit details
  3. Copy the full SHA
    61a6726 View commit details

Commits on Sep 6, 2016

  1. Copy the full SHA
    9c29857 View commit details
  2. Fix for race condition from babysit cron job (#49)

    - Fix race condition from babysit cron job
    chris-gilmore authored and chaochenq committed Sep 6, 2016
    Copy the full SHA
    7d1429b View commit details

Commits on Sep 7, 2016

  1. Copy the full SHA
    78e7c50 View commit details

Commits on Sep 16, 2016

  1. Copy the full SHA
    e1d48d8 View commit details
  2. Copy the full SHA
    51c60e0 View commit details

Commits on Jun 13, 2017

  1. Fail publisher thread on LinkageErrors. These happen with joda time. (#…

    Nextdoor Engineer authored and chaochenq committed Jun 13, 2017
    Copy the full SHA
    69f7b41 View commit details
  2. ADDMETADATA feature to allow addition of arbitrary metadata in JSON f…

    …ormat (#68)
    
    * Adding ADDMETADATA configuration option to insert JSON metadata inline with record
    
    * Adding ADDMETADATA configuration option to insert JSON metadata inline with record
    
    * Fixing metadata field name
    zacharya authored and chaochenq committed Jun 13, 2017
    Copy the full SHA
    b47dbe5 View commit details

Commits on Jun 14, 2017

  1. Adding support for Debian (#76)

    qivers authored and chaochenq committed Jun 14, 2017
    Copy the full SHA
    807ed63 View commit details

Commits on Dec 21, 2017

  1. EC2 metadata processor (#112)

    * Adding EC2 aws sdk package
    
    * Adding EC2 aws sdk dependency
    
    * Initial commit
    
    * Fixing configuration example
    
    * Adding support for the AddEC2MetadataConverter
    
    * Adding support for metadata auto refresh
    
    * Updated metadata timestamp to iso time format
    
    * Fine tuning log messages
    buholzer authored and chaochenq committed Dec 21, 2017
    Copy the full SHA
    aa78921 View commit details
  2. Agent config directory for flow configurations (#113)

    * Adding support for configuration directory
    
    * Fixing ident
    
    * Adding config dir to the install
    
    * Fixing try catch flow issue
    buholzer authored and chaochenq committed Dec 21, 2017
    Copy the full SHA
    817ddb8 View commit details
  3. Install s wget dependency (#123)

    dgoradia authored and chaochenq committed Dec 21, 2017
    Copy the full SHA
    62c45be View commit details

Commits on Dec 22, 2017

  1. Changed the ordering of configuration loading, added additional debug (

    …#90)
    
    * Changed the ordering of configuration loadin, added additional debug logs to LogToJSONDataConverter and included extra depenedencies in the pom file
    
    * Added logging to CSVToJSONDataConverter and removed debug messages on each parse in LogToJSONDataConverter
    
    * Changed logging to use a single method call instead of making it a property of the class
    cyb3rd0g1 authored and chaochenq committed Dec 22, 2017
    Copy the full SHA
    2062ecb View commit details
  2. Copy the full SHA
    830ef04 View commit details

Commits on Mar 5, 2018

  1. Copy the full SHA
    881d0e0 View commit details
  2. Change hard coded path for java to use the current java home that is …

    …running ant. As long as java is in the PATH, this should work assuming its a JDK. (#131)
    jdonofrio728 authored and chaochenq committed Mar 5, 2018
    Copy the full SHA
    35bacf4 View commit details
  3. Copy the full SHA
    0a3d7ee View commit details
  4. Copy the full SHA
    a2bae50 View commit details
  5. Copy the full SHA
    30b10bb View commit details

Commits on Sep 11, 2018

  1. Copy the full SHA
    21705b1 View commit details

Commits on Oct 8, 2018

  1. Copy the full SHA
    f4828b6 View commit details
  2. Adding standard files (#137)

    hyandell authored and chaochenq committed Oct 8, 2018
    Copy the full SHA
    920254b View commit details
  3. pluggable data converter (#140)

    eridal authored and chaochenq committed Oct 8, 2018
    Copy the full SHA
    fb2812d View commit details
  4. Copy the full SHA
    6bde3f7 View commit details
  5. Copy the full SHA
    a52ac1a View commit details

Commits on Oct 9, 2018

  1. Replace the internal custom logger with Log4j standard loggers (#150)

    * Replace the internal custom logger with Log4j standard loggers
    
    The primary work here is to remove the internal custom logging library
    and replace it with a standard Log4j setup. This lets the user define
    their own logging settings in a standard way that doesn't require a
    bunch of custom settings in the AgentConfiguration class.
    
    Unfortunately there are a few other fixes in here that we've squashed
    down - I've tried to list them here:
    
    * Fix a few bugs in the Ubuntu init script
    * Dynamically find the 'service' command path in the babysit script
    * Leverate the actual init scripts for auto-restarting the agent if necessary.
    * A few more Ubuntu init script bug fixes.
    * Package the app up into amazon-kinesis-agent-<tag>.tar.gz files.
    * Bugfix: /etc/default, not /etc/defaults on Ubuntu
    * Bugfix on the babysit script: --ppid doesn't work everywhere.
    * Remove custom logger
    
    * Revert setup -> setup.sh change
    
    * Add back inadvertantly removed lines from the babysit script
    diranged authored and chaochenq committed Oct 9, 2018
    Copy the full SHA
    627d226 View commit details

Commits on Oct 10, 2018

  1. [FIX] Setup and init scripts (#152)

    * [FIX]Added execute permission on setup script
    
    * [FIX]Using log4j instead of build in logger
    
    * [FIX]Properly determine distro name
    Alex Gaganov authored and chaochenq committed Oct 10, 2018
    Copy the full SHA
    c29662e View commit details

Commits on Oct 17, 2018

  1. Copy the full SHA
    cfe4483 View commit details

Commits on Oct 19, 2018

  1. Add log4j config file

    chaochenq committed Oct 19, 2018
    Copy the full SHA
    d17e2e8 View commit details

Commits on Mar 8, 2019

  1. Copy the full SHA
    8e0f246 View commit details
  2. Use Jackson 2.8.11

    chaochenq committed Mar 8, 2019
    Copy the full SHA
    349554c View commit details

Commits on Apr 10, 2019

  1. Copy the full SHA
    2177990 View commit details

Commits on Dec 20, 2019

  1. Copy the full SHA
    75c3dd7 View commit details

Commits on Jan 28, 2020

  1. Copy the full SHA
    6d0e32b View commit details

Commits on Mar 24, 2020

  1. Bump jackson-databind from 2.8.11 to 2.9.10.1 (#193)

    Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.8.11 to 2.9.10.1.
    - [Release notes](https://github.com/FasterXML/jackson/releases)
    - [Commits](https://github.com/FasterXML/jackson/commits)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 24, 2020
    Copy the full SHA
    27b41f8 View commit details
  2. Bump jackson-databind from 2.9.10.1 to 2.9.10.3 (#197)

    Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.9.10.1 to 2.9.10.3.
    - [Release notes](https://github.com/FasterXML/jackson/releases)
    - [Commits](https://github.com/FasterXML/jackson/commits)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 24, 2020
    1
    Copy the full SHA
    93dd074 View commit details

Commits on Apr 16, 2020

  1. switch log4j from 1.2.x to 2.12.1, aws sdk from 1.11.28 to 1.11.700, …

    …jackson from 2.8.x to 2.10.3
    Marat Khusainov committed Apr 16, 2020
    Copy the full SHA
    fef5145 View commit details

Commits on Jun 29, 2020

  1. Copy the full SHA
    1ee2587 View commit details
Showing with 29,245 additions and 708 deletions.
  1. +6 −0 .github/PULL_REQUEST_TEMPLATE.md
  2. +26 −0 .gitignore
  3. +18 −0 .travis.yml
  4. +4 −0 CODE_OF_CONDUCT.md
  5. +61 −0 CONTRIBUTING.md
  6. +1 −1 NOTICE.txt
  7. +26 −5 README.md
  8. +20 −10 bin/aws-kinesis-agent-babysit
  9. +22 −0 bin/aws-kinesis-agent-manual-run.sh
  10. +107 −0 bin/aws-kinesis-agent.Debian
  11. +91 −81 bin/{aws-kinesis-agent → aws-kinesis-agent.RedHat}
  12. +107 −0 bin/aws-kinesis-agent.Ubuntu
  13. +9 −2 bin/start-aws-kinesis-agent
  14. +18 −6 build.xml
  15. +35 −0 configuration/example/agent.json
  16. +53 −16 pom.xml
  17. +99 −28 setup
  18. +50 −10 src/com/amazon/kinesis/streaming/agent/Agent.java
  19. +3 −2 src/com/amazon/kinesis/streaming/agent/AgentAWSCredentialsProvider.java
  20. +7 −2 src/com/amazon/kinesis/streaming/agent/AgentAWSCredentialsProviderChain.java
  21. +57 −5 src/com/amazon/kinesis/streaming/agent/AgentContext.java
  22. +1 −1 src/com/amazon/kinesis/streaming/agent/ByteBufferInputStream.java
  23. +1 −1 src/com/amazon/kinesis/streaming/agent/ByteBuffers.java
  24. +1 −1 src/com/amazon/kinesis/streaming/agent/Constants.java
  25. +0 −51 src/com/amazon/kinesis/streaming/agent/CustomLog4jFallbackErrorHandler.java
  26. +1 −1 src/com/amazon/kinesis/streaming/agent/HeartbeatService.java
  27. +1 −1 src/com/amazon/kinesis/streaming/agent/IHeartbeatProvider.java
  28. +0 −210 src/com/amazon/kinesis/streaming/agent/Logging.java
  29. +160 −0 src/com/amazon/kinesis/streaming/agent/UserDefinedCredentialsProvider.java
  30. +22 −22 src/com/amazon/kinesis/streaming/agent/config/AgentConfiguration.java
  31. +1 −24 src/com/amazon/kinesis/streaming/agent/config/AgentOptions.java
  32. +1 −1 src/com/amazon/kinesis/streaming/agent/config/BooleanConverter.java
  33. +45 −11 src/com/amazon/kinesis/streaming/agent/config/Configuration.java
  34. +1 −1 src/com/amazon/kinesis/streaming/agent/config/ConfigurationConverter.java
  35. +1 −1 src/com/amazon/kinesis/streaming/agent/config/ConfigurationException.java
  36. +1 −1 src/com/amazon/kinesis/streaming/agent/config/PathConverter.java
  37. +1 −1 src/com/amazon/kinesis/streaming/agent/config/StringConverterWrapper.java
  38. +1 −1 src/com/amazon/kinesis/streaming/agent/config/package-info.java
  39. +0 −63 src/com/amazon/kinesis/streaming/agent/custom.log4j.xml
  40. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/AbstractMetricsScope.java
  41. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/AccumulatingMetricsScope.java
  42. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/CWMetricKey.java
  43. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/CWMetricsFactory.java
  44. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/CWMetricsScope.java
  45. +6 −4 src/com/amazon/kinesis/streaming/agent/metrics/CWPublisherRunnable.java
  46. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/CompositeMetricsFactory.java
  47. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/CompositeMetricsScope.java
  48. +3 −3 src/com/amazon/kinesis/streaming/agent/metrics/DefaultCWMetricsPublisher.java
  49. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/ICWMetricsPublisher.java
  50. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/IMetricsContext.java
  51. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/IMetricsFactory.java
  52. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/IMetricsScope.java
  53. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/LogMetricsFactory.java
  54. +3 −3 src/com/amazon/kinesis/streaming/agent/metrics/LogMetricsScope.java
  55. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/MetricAccumulatingQueue.java
  56. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/MetricDatumWithKey.java
  57. +4 −1 src/com/amazon/kinesis/streaming/agent/metrics/Metrics.java
  58. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/NestedMetricsScope.java
  59. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/NullMetricsFactory.java
  60. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/NullMetricsScope.java
  61. +1 −1 src/com/amazon/kinesis/streaming/agent/metrics/package-info.java
  62. +1 −1 src/com/amazon/kinesis/streaming/agent/package-info.java
  63. +40 −0 src/com/amazon/kinesis/streaming/agent/processing/exceptions/DataConversionException.java
  64. +16 −7 ...ing/agent/{CustomLog4jFallbackPatterLayout.java → processing/exceptions/LogParsingException.java}
  65. +34 −0 src/com/amazon/kinesis/streaming/agent/processing/interfaces/IDataConverter.java
  66. +30 −0 src/com/amazon/kinesis/streaming/agent/processing/interfaces/IJSONPrinter.java
  67. +35 −0 src/com/amazon/kinesis/streaming/agent/processing/interfaces/ILogParser.java
  68. +131 −0 src/com/amazon/kinesis/streaming/agent/processing/parsers/ApacheLogParser.java
  69. +104 −0 src/com/amazon/kinesis/streaming/agent/processing/parsers/BaseLogParser.java
  70. +85 −0 src/com/amazon/kinesis/streaming/agent/processing/parsers/PatternConstants.java
  71. +104 −0 src/com/amazon/kinesis/streaming/agent/processing/parsers/SysLogParser.java
  72. +147 −0 src/com/amazon/kinesis/streaming/agent/processing/processors/AddEC2MetadataConverter.java
  73. +92 −0 src/com/amazon/kinesis/streaming/agent/processing/processors/AddMetadataConverter.java
  74. +94 −0 src/com/amazon/kinesis/streaming/agent/processing/processors/AgentDataConverterChain.java
  75. +48 −0 src/com/amazon/kinesis/streaming/agent/processing/processors/BracketsDataConverter.java
  76. +96 −0 src/com/amazon/kinesis/streaming/agent/processing/processors/CSVToJSONDataConverter.java
  77. +84 −0 src/com/amazon/kinesis/streaming/agent/processing/processors/LogToJSONDataConverter.java
  78. +67 −0 src/com/amazon/kinesis/streaming/agent/processing/processors/PluggableDataConverter.java
  79. +73 −0 src/com/amazon/kinesis/streaming/agent/processing/processors/SingleLineDataConverter.java
  80. +41 −0 src/com/amazon/kinesis/streaming/agent/processing/utils/PrettyJSONPrinter.java
  81. +141 −0 src/com/amazon/kinesis/streaming/agent/processing/utils/ProcessingUtilsFactory.java
  82. +40 −0 src/com/amazon/kinesis/streaming/agent/processing/utils/SimpleJSONPrinter.java
  83. +117 −0 src/com/amazon/kinesis/streaming/agent/providers/CLIWebIdentityTokenCredentialsProvider.java
  84. +58 −7 src/com/amazon/kinesis/streaming/agent/tailing/AbstractParser.java
  85. +22 −6 src/com/amazon/kinesis/streaming/agent/tailing/AbstractRecord.java
  86. +3 −4 src/com/amazon/kinesis/streaming/agent/tailing/AbstractSender.java
  87. +72 −0 src/com/amazon/kinesis/streaming/agent/tailing/AggregationSplitter.java
  88. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/AsyncPublisher.java
  89. +3 −3 src/com/amazon/kinesis/streaming/agent/tailing/AsyncPublisherService.java
  90. +3 −3 src/com/amazon/kinesis/streaming/agent/tailing/AsyncPublisherThrottler.java
  91. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/BufferSendResult.java
  92. +37 −2 src/com/amazon/kinesis/streaming/agent/tailing/FileFlow.java
  93. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/FileFlowFactory.java
  94. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/FileId.java
  95. +8 −6 src/com/amazon/kinesis/streaming/agent/tailing/FileTailer.java
  96. +3 −2 src/com/amazon/kinesis/streaming/agent/tailing/FirehoseConstants.java
  97. +10 −4 src/com/amazon/kinesis/streaming/agent/tailing/FirehoseFileFlow.java
  98. +3 −3 src/com/amazon/kinesis/streaming/agent/tailing/FirehoseParser.java
  99. +5 −5 src/com/amazon/kinesis/streaming/agent/tailing/FirehoseRecord.java
  100. +7 −1 src/com/amazon/kinesis/streaming/agent/tailing/FirehoseSender.java
  101. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/IParser.java
  102. +2 −1 src/com/amazon/kinesis/streaming/agent/tailing/IRecord.java
  103. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/ISender.java
  104. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/ISplitter.java
  105. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/KinesisConstants.java
  106. +1 −4 src/com/amazon/kinesis/streaming/agent/tailing/KinesisFileFlow.java
  107. +3 −3 src/com/amazon/kinesis/streaming/agent/tailing/KinesisParser.java
  108. +5 −5 src/com/amazon/kinesis/streaming/agent/tailing/KinesisRecord.java
  109. +7 −7 src/com/amazon/kinesis/streaming/agent/tailing/KinesisSender.java
  110. +6 −4 src/com/amazon/kinesis/streaming/agent/tailing/PublishingQueue.java
  111. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/RecordBuffer.java
  112. +4 −2 src/com/amazon/kinesis/streaming/agent/tailing/RegexSplitter.java
  113. +4 −4 src/com/amazon/kinesis/streaming/agent/tailing/SimplePublisher.java
  114. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/SingleLineSplitter.java
  115. +20 −3 src/com/amazon/kinesis/streaming/agent/tailing/SourceFile.java
  116. +3 −3 src/com/amazon/kinesis/streaming/agent/tailing/SourceFileTracker.java
  117. +3 −3 src/com/amazon/kinesis/streaming/agent/tailing/TrackedFile.java
  118. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/TrackedFileList.java
  119. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/TrackedFileRotationAnalyzer.java
  120. +3 −3 src/com/amazon/kinesis/streaming/agent/tailing/checkpoints/Checkpointer.java
  121. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/checkpoints/FileCheckpoint.java
  122. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/checkpoints/FileCheckpointStore.java
  123. +3 −3 src/com/amazon/kinesis/streaming/agent/tailing/checkpoints/SQLiteFileCheckpointStore.java
  124. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/checkpoints/package-info.java
  125. +1 −1 src/com/amazon/kinesis/streaming/agent/tailing/package-info.java
  126. +1 −1 src/com/amazon/kinesis/streaming/agent/versionInfo.properties
  127. +7 −3 support/aws-kinesis-agent.sysconfig
  128. +48 −0 support/log4j.xml
  129. +103 −0 tst/com/amazon/kinesis/streaming/agent/AgentAWSCredentialsProviderChainTest.java
  130. +103 −0 tst/com/amazon/kinesis/streaming/agent/AgentContextTest.java
  131. +99 −0 tst/com/amazon/kinesis/streaming/agent/ByteBufferInputStreamTest.java
  132. +159 −0 tst/com/amazon/kinesis/streaming/agent/ByteBuffersTest.java
  133. +23 −0 tst/com/amazon/kinesis/streaming/agent/TestUserDefinedCredentialsProvider.java
  134. +43 −0 tst/com/amazon/kinesis/streaming/agent/agentconfig1.json
  135. +109 −0 tst/com/amazon/kinesis/streaming/agent/config/AgentConfigurationTest.java
  136. +51 −0 tst/com/amazon/kinesis/streaming/agent/config/BooleanConverterTest.java
  137. +232 −0 tst/com/amazon/kinesis/streaming/agent/config/ConfigurationTest.java
  138. +54 −0 tst/com/amazon/kinesis/streaming/agent/config/agentconfig1.json
  139. +48 −0 tst/com/amazon/kinesis/streaming/agent/config/config1.json
  140. +89 −0 tst/com/amazon/kinesis/streaming/agent/metrics/BaseMetricsScopeTest.java
  141. +189 −0 tst/com/amazon/kinesis/streaming/agent/metrics/CWPublisherRunnableTest.java
  142. +100 −0 tst/com/amazon/kinesis/streaming/agent/metrics/DefaultCWMetricsPublisherTest.java
  143. +89 −0 tst/com/amazon/kinesis/streaming/agent/metrics/MetricAccumulatingQueueTest.java
  144. +24 −0 tst/com/amazon/kinesis/streaming/agent/metrics/TestHelper.java
  145. +228 −0 tst/com/amazon/kinesis/streaming/agent/processing/processors/DataConverterTest.java
  146. +920 −0 tst/com/amazon/kinesis/streaming/agent/tailing/AbstractParserTest.java
  147. +109 −0 tst/com/amazon/kinesis/streaming/agent/tailing/AgentEndToEndTest.java
  148. +20 −0 tst/com/amazon/kinesis/streaming/agent/tailing/AgentEndToEndTest.json
  149. +20 −0 tst/com/amazon/kinesis/streaming/agent/tailing/AgentEndToEndTestHighThroughput.json
  150. +42 −0 tst/com/amazon/kinesis/streaming/agent/tailing/AgentEnduranceTest.java
  151. +13 −0 tst/com/amazon/kinesis/streaming/agent/tailing/AgentEnduranceTest.json
  152. +169 −0 tst/com/amazon/kinesis/streaming/agent/tailing/AggregationSplitterTest.java
  153. +208 −0 tst/com/amazon/kinesis/streaming/agent/tailing/AsyncPublisherServiceTest.java
  154. +230 −0 tst/com/amazon/kinesis/streaming/agent/tailing/AsyncPublisherTest.java
  155. +310 −0 tst/com/amazon/kinesis/streaming/agent/tailing/AsyncPublisherThrottlerTest.java
  156. +260 −0 tst/com/amazon/kinesis/streaming/agent/tailing/FileFlowTest.java
  157. +46 −0 tst/com/amazon/kinesis/streaming/agent/tailing/FileIdTest.java
  158. +52 −0 tst/com/amazon/kinesis/streaming/agent/tailing/FileTailerEnduranceTest.java
  159. +14 −0 tst/com/amazon/kinesis/streaming/agent/tailing/FileTailerEnduranceTest.json
  160. +479 −0 tst/com/amazon/kinesis/streaming/agent/tailing/FileTailerTest.java
  161. +56 −0 tst/com/amazon/kinesis/streaming/agent/tailing/FirehoseFileFlowTest.java
  162. +136 −0 tst/com/amazon/kinesis/streaming/agent/tailing/FirehoseParserTest.java
  163. +54 −0 tst/com/amazon/kinesis/streaming/agent/tailing/FirehoseRecordTest.java
  164. +202 −0 tst/com/amazon/kinesis/streaming/agent/tailing/FirehoseSenderTest.java
  165. +110 −0 tst/com/amazon/kinesis/streaming/agent/tailing/KinesisFileFlowTest.java
  166. +61 −0 tst/com/amazon/kinesis/streaming/agent/tailing/KinesisParserTest.java
  167. +77 −0 tst/com/amazon/kinesis/streaming/agent/tailing/KinesisRecordTest.java
  168. +225 −0 tst/com/amazon/kinesis/streaming/agent/tailing/KinesisSenderTest.java
  169. +771 −0 tst/com/amazon/kinesis/streaming/agent/tailing/PublishingQueueTest.java
  170. +127 −0 tst/com/amazon/kinesis/streaming/agent/tailing/RecordBufferTest.java
  171. +56 −0 tst/com/amazon/kinesis/streaming/agent/tailing/SimplePublisherTest.java
  172. +174 −0 tst/com/amazon/kinesis/streaming/agent/tailing/SourceFileTest.java
  173. +408 −0 tst/com/amazon/kinesis/streaming/agent/tailing/SourceFileTrackerTest.java
  174. +240 −0 tst/com/amazon/kinesis/streaming/agent/tailing/TrackedFileRotationAnalyzerTest.java
  175. +113 −0 tst/com/amazon/kinesis/streaming/agent/tailing/TrackedFileTest.java
  176. +9 −0 tst/com/amazon/kinesis/streaming/agent/tailing/apache_test_log
  177. +7 −0 tst/com/amazon/kinesis/streaming/agent/tailing/apache_test_log_json
  178. +88 −0 tst/com/amazon/kinesis/streaming/agent/tailing/checkpoints/CheckpointerTest.java
  179. +57 −0 tst/com/amazon/kinesis/streaming/agent/tailing/checkpoints/FileCheckpointTest.java
  180. +215 −0 tst/com/amazon/kinesis/streaming/agent/tailing/checkpoints/SQLiteFileCheckpointStoreTest.java
  181. +58 −0 tst/com/amazon/kinesis/streaming/agent/tailing/parsed_singleline_json
  182. +1,695 −0 tst/com/amazon/kinesis/streaming/agent/tailing/pretty_printed_json
  183. +6 −0 tst/com/amazon/kinesis/streaming/agent/tailing/syslog_test
  184. +6 −0 tst/com/amazon/kinesis/streaming/agent/tailing/syslog_test_json
  185. +12,986 −0 tst/com/amazon/kinesis/streaming/agent/tailing/test_service_log
  186. +92 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/CopyFileRotator.java
  187. +52 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/CopyFileRotatorTest.java
  188. +60 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/CreateFileRotator.java
  189. +17 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/CreateFileRotatorTest.java
  190. +406 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/FileRotator.java
  191. +214 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/FileRotatorTestBase.java
  192. +280 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/FileSender.java
  193. +264 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/RecordGenerator.java
  194. +85 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/RememberedTrackedFile.java
  195. +45 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/RenameFileRotator.java
  196. +18 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/RenameFileRotatorTest.java
  197. +66 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/RotatingFileGenerator.java
  198. +451 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/TailingTestBase.java
  199. +118 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/TestAgentContext.java
  200. +114 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/TestableFileTailer.java
  201. +274 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/TestableSourceFileTracker.java
  202. +108 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/TruncateFileRotator.java
  203. +33 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/TruncateFileRotatorTest.java
  204. +7 −0 tst/com/amazon/kinesis/streaming/agent/tailing/testing/package-info.java
  205. +669 −0 tst/com/amazon/kinesis/streaming/agent/testing/TestUtils.java
  206. +193 −0 tst/com/amazon/kinesis/streaming/agent/testing/TestUtilsTest.java
  207. +7 −0 tst/com/amazon/kinesis/streaming/agent/testing/package-info.java
  208. +17 −0 tst/log4j2-test.yml
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Issue #, if available:*

*Description of changes:*


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Maven
target/
pom.xml.*
release.properties

# IntelliJ Idea
.idea/
out/
*.ipr
*.iws
*.iml

# Eclipse
.classpath
.project
.settings/
.metadata/

# Ignore Mac DS_Store files
.DS_Store

# Junk working files
ant_build
dependencies
*.swp
*.swo
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: java
jdk:
- openjdk8
sudo: required
install:
- true
before_deploy:
- mvn clean
- sudo ./setup --build
- tar -zcvf /tmp/amazon-kinesis-agent-${TRAVIS_TAG}.tgz .
deploy:
- provider: releases
file: /tmp/amazon-kinesis-agent-${TRAVIS_TAG}.tgz
api_key: "$OAUTH_TOKEN"
skip_cleanup: true
on:
tags: true
all_branches: true
4 changes: 4 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.
61 changes: 61 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Contributing Guidelines

Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
documentation, we greatly value feedback and contributions from our community.

Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
information to effectively respond to your bug report or contribution.


## Reporting Bugs/Feature Requests

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check [existing open](https://github.com/awslabs/amazon-kinesis-agent/issues), or [recently closed](https://github.com/awslabs/amazon-kinesis-agent/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
* The version of our code being used
* Any modifications you've made relevant to the bug
* Anything unusual about your environment or deployment


## Contributing via Pull Requests
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the *master* branch.
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.

To send us a pull request, please:

1. Fork the repository.
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
3. Ensure local tests pass.
4. Commit to your fork using clear commit messages.
5. Send us a pull request, answering any default questions in the pull request interface.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).


## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/awslabs/amazon-kinesis-agent/labels/help%20wanted) issues is a great place to start.


## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.


## Security issue notifications
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.


## Licensing

See the [LICENSE](https://github.com/awslabs/amazon-kinesis-agent/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AWSKinesisStreamingDataAgent
Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -24,6 +24,8 @@ The **Amazon Kinesis Agent** is a stand-alone Java software application that off
After you've downloaded the code from GitHub, you can install the Amazon Kinesis Agent with the following command:

```sh
# Optionally, you can set DEBUG=1 in your environment to enable massively
# verbose output of the script
sudo ./setup --install
```

@@ -74,13 +76,27 @@ sudo ./setup --uninstall

## Building from Source

The setup script is only tested on **Red Hat Enterprise Linux** version 7 or later and **Amazon Linux AMI** version 2015.09 or later. For other distributions or platforms, you can build the Java project with the following command:
The installation done by the setup script is only tested on the following OS Disributions:

* **Red Hat Enterprise Linux** version 7 or later
* **Amazon Linux AMI** version 2015.09 or later
* **Ubuntu Linux** version 12.04 or later
* **Debian Linux** version 8.6 or later

For other distributions or platforms, you can build the Java project with the following command:

```sh
ant -buildfile ant_build.xml [-Dbuild.dependencies=DEPENDENCY_DIR]
sudo ./setup --build
```

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
or by using Ant target as you would build any Java program:

```sh
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:

@@ -91,6 +107,11 @@ 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.

## Release Notes
### Release 1.1 (April 11, 2016)
* **Pre-process data before sending it to destinations** &mdash; Amazon Kinesis Agent now supports to pre-process the records parsed from monitored files before sending them to your streams. The processing capability can be enabled by adding dataProcessingOptions configuration to file flow. There are three available options for now: SINGLELINE, CSVTOJSON, and LOGTOJSON. For more information, see [Writing to Amazon Kinesis with Agents][kinesis-stream-agent-guide] and [Writing to Delivery Streams with Agents][kinesis-firehose-agent-guide].
* **Ingore tailing compressed files** &mdash; Compressed file extensions, e.g. .gz, .bz2, and .zip, are ignored for tailing.
* **Force to kill the program on out-of-memory error** &mdash; The program will be killed when it's out of memory.

### Release 1.0 (October 7, 2015)
* This is the first release.

@@ -100,7 +121,7 @@ java -cp CLASSPATH "com.amazon.kinesis.streaming.agent.Agent"
[docs-signup]: http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/java-dg-setup.html
[kinesis-stream]: https://aws.amazon.com/kinesis/streams/
[kinesis-firehose]: https://aws.amazon.com/kinesis/firehose/
[kinesis-stream-create]: http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-create-stream.html
[kinesis-stream-create]: http://docs.aws.amazon.com/streams/latest/dev/kinesis-using-sdk-java-create-stream.html
[kinesis-firehose-create]: http://docs.aws.amazon.com/firehose/latest/dev/basic-create.html
[kinesis-stream-agent-guide]: http://docs.aws.amazon.com/kinesis/latest/dev/writing-with-agents.html
[kinesis-stream-agent-guide]: http://docs.aws.amazon.com/streams/latest/dev/writing-with-agents.html
[kinesis-firehose-agent-guide]: http://docs.aws.amazon.com/firehose/latest/dev/writing-with-agents.html
30 changes: 20 additions & 10 deletions bin/aws-kinesis-agent-babysit
Original file line number Diff line number Diff line change
@@ -2,25 +2,35 @@

# The cron-babysit periodically checks the status of the agent, and restart it if stopped abnormally

PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
DAEMON_NAME=aws-kinesis-agent
PIDFILE=/var/run/$DAEMON_NAME.pid
SERVICE="/sbin/service $DAEMON_NAME"
SERVICE="service $DAEMON_NAME"

function get_agent_pid() {
echo $(ps --ppid $(cat $PIDFILE 2>/dev/null) ho pid 2>/dev/null)
}
# If using systemd and the service is disabled skip a babysit check.
#
# We don't do this for upstart/sysvinit systems as a `restart` will fail immediately
# when trying to a stop a service that isn't registred to be running.
# Additionally checking if a service is enabled is not straightforward as in systemd.
if [ -d /run/systemd/system ]; then
systemctl is-enabled "${DAEMON_NAME}.service" >/dev/null 2>&1 || exit 0
fi

function start_agent() {
$SERVICE restart || exit 1
sleep 3
[[ -n $(get_agent_pid) ]] || exit 1
$SERVICE status >/dev/null 2>&1 || exit 1
}

# Check if PID file exists.
$SERVICE status >/dev/null 2>&1
status=$?

# Check if PID file exists.
# If it does not, it means either the agent was never started or it was stopped by the user.
[[ -f $PIDFILE ]] || exit 0

# Check if the child Java process is alive. If not, we should start
[[ -n $(get_agent_pid) ]] || start_agent

exit 0
if [ "$status" -eq "1" -o "$status" -eq "2" -o "$status" -eq "3" ]; then
start_agent
fi

exit 0
22 changes: 22 additions & 0 deletions bin/aws-kinesis-agent-manual-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Log files are in /var/log/aws-kinesis-agent/

JAVA_START_HEAP="256m"
JAVA_MAX_HEAP="512m"
OOME_ARGS_DEFAULT="\"/bin/kill -9 %p\""
OOME_ARGS="-XX:OnOutOfMemoryError=${OOME_ARGS:-$OOME_ARGS_DEFAULT}"

JAVA_DIR="/usr/share/java"
LIB_DIR="/usr/share/aws-kinesis-agent/lib"
#CLASSPATH="$JAVA_DIR"/*:"$LIB_DIR":$(find "$LIB_DIR" -type f -name \*.jar | paste -s -d:):"$CLASSPATH"
CLASSPATH="$LIB_DIR":$(find "$LIB_DIR" -type f -name \*.jar | paste -s -d:):"$CLASSPATH"

JAVACMD="java"
JVM_ARGS="-server -Xms${JAVA_START_HEAP} -Xmx${JAVA_MAX_HEAP} $JVM_ARGS"

MAIN_CLASS="com.amazon.kinesis.streaming.agent.Agent"

exec $JAVACMD $JVM_ARGS "$OOME_ARGS" \
-cp "$CLASSPATH" \
$MAIN_CLASS "$@"
107 changes: 107 additions & 0 deletions bin/aws-kinesis-agent.Debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#! /usr/bin/env bash

### BEGIN INIT INFO
# Provides: aws-kinesis-agent
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Daemon for Amazon Kinesis Agent.
# Description: This script is responsible for running Amazon Kinesis Agent
# as a daemon.
### END INIT INFO

set -e

# get init functions: status()
. /lib/lsb/init-functions

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON_NAME=aws-kinesis-agent
NAME=$DAEMON_NAME # debian compatibility
AGENT_USER=aws-kinesis-agent-user
PIDFILE=/var/run/$DAEMON_NAME.pid
LOG_DIR=/var/log/$DAEMON_NAME
SHUTDOWN_TIME=11 #10 second default value in AgentConfiguration.java, +1 second buffer
INITLOGFILE=/tmp/$DAEMON_NAME.`date '+%Y%m%d%H%M%S'`.initlog

# This script is in /etc/rc.d/init.d/ and the executable is in /usr/bin
BASEDIR=${BASEDIR%/}
DAEMON_EXEC=$BASEDIR/usr/bin/start-$DAEMON_NAME
LOG_CONFIG=${LOG_CONFIG:-/etc/aws-kinesis/log4j.xml}
ARGS=${ARGS:-}
RETVAL=0

# load any configs/environment from /etc/default/<name>
[ -e /etc/default/$DAEMON_NAME ] && . /etc/default/$DAEMON_NAME

export JVM_ARGS="$JVM_ARGS -Dlog4j.configurationFile=file://$LOG_CONFIG "

# Export the settings
do_start () {
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# other if daemon could not be started or a failure occured
start-stop-daemon --start \
--quiet \
--background \
--make-pidfile \
--pidfile $PIDFILE \
--chuid $AGENT_USER \
--startas $DAEMON_EXEC -- \
$ARGS
}

do_stop () {
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# other if daemon could not be stopped or a failure occurred
start-stop-daemon --stop \
--quiet \
--retry=TERM/$SHUTDOWN_TIME/KILL/5 \
--pidfile $PIDFILE \
--oknodo \
&& rm -f ${PIDFILE}
}



command=$1
shift
case "$command" in
start)
log_daemon_msg "Starting $DAEMON_NAME"
do_start

case "$?" in
0) log_end_msg 0 ;;
1) log_warning_msg "already started"
log_end_msg 0 ;;
*) log_end_msg 1 ;;
esac
;;
stop)
log_daemon_msg "Stopping $DAEMON_NAME"
do_stop

case "$?" in
0) log_end_msg 0 ;;
*) log_end_msg 1 ;;
esac
;;
restart)
$0 stop
$0 start
;;
status)
status_of_proc -p $PIDFILE $DAEMON_NAME $NAME
exit $?
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL
Loading