logstash-lib 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +24 -0
- data/.tailor +8 -0
- data/.travis.yml +12 -0
- data/CHANGELOG +1185 -0
- data/CONTRIBUTING.md +61 -0
- data/CONTRIBUTORS +79 -0
- data/LICENSE +14 -0
- data/Makefile +460 -0
- data/README.md +120 -0
- data/STYLE.md +96 -0
- data/bin/logstash +37 -0
- data/bin/logstash-test +4 -0
- data/bin/logstash-web +4 -0
- data/bin/logstash.lib.sh +78 -0
- data/bot/check_pull_changelog.rb +89 -0
- data/docs/configuration.md +260 -0
- data/docs/docgen.rb +242 -0
- data/docs/extending/example-add-a-new-filter.md +121 -0
- data/docs/extending/index.md +91 -0
- data/docs/flags.md +43 -0
- data/docs/generate_index.rb +28 -0
- data/docs/index.html.erb +56 -0
- data/docs/learn.md +46 -0
- data/docs/life-of-an-event.md +109 -0
- data/docs/logging-tool-comparisons.md +60 -0
- data/docs/plugin-doc.html.erb +91 -0
- data/docs/plugin-milestones.md +41 -0
- data/docs/plugin-synopsis.html.erb +24 -0
- data/docs/release-engineering.md +46 -0
- data/docs/release-test-results.md +14 -0
- data/docs/repositories.md +35 -0
- data/docs/tutorials/10-minute-walkthrough/apache-elasticsearch.conf +35 -0
- data/docs/tutorials/10-minute-walkthrough/apache-parse.conf +33 -0
- data/docs/tutorials/10-minute-walkthrough/apache_log.1 +1 -0
- data/docs/tutorials/10-minute-walkthrough/apache_log.2.bz2 +0 -0
- data/docs/tutorials/10-minute-walkthrough/hello-search.conf +25 -0
- data/docs/tutorials/10-minute-walkthrough/hello.conf +16 -0
- data/docs/tutorials/10-minute-walkthrough/index.md +124 -0
- data/docs/tutorials/10-minute-walkthrough/step-5-output.txt +17 -0
- data/docs/tutorials/getting-started-centralized-overview-diagram.png +0 -0
- data/docs/tutorials/getting-started-centralized-overview-diagram.xml +1 -0
- data/docs/tutorials/getting-started-centralized.md +217 -0
- data/docs/tutorials/getting-started-simple.md +200 -0
- data/docs/tutorials/just-enough-rabbitmq-for-logstash.md +201 -0
- data/docs/tutorials/media/frontend-response-codes.png +0 -0
- data/docs/tutorials/metrics-from-logs.md +84 -0
- data/docs/tutorials/zeromq.md +118 -0
- data/extract_services.rb +29 -0
- data/gembag.rb +64 -0
- data/lib/logstash-event.rb +2 -0
- data/lib/logstash.rb +4 -0
- data/lib/logstash/JRUBY-6970-openssl.rb +22 -0
- data/lib/logstash/JRUBY-6970.rb +102 -0
- data/lib/logstash/agent.rb +305 -0
- data/lib/logstash/certs/cacert.pem +3895 -0
- data/lib/logstash/codecs/base.rb +49 -0
- data/lib/logstash/codecs/compress_spooler.rb +50 -0
- data/lib/logstash/codecs/dots.rb +18 -0
- data/lib/logstash/codecs/edn.rb +28 -0
- data/lib/logstash/codecs/edn_lines.rb +36 -0
- data/lib/logstash/codecs/fluent.rb +55 -0
- data/lib/logstash/codecs/graphite.rb +114 -0
- data/lib/logstash/codecs/json.rb +41 -0
- data/lib/logstash/codecs/json_lines.rb +52 -0
- data/lib/logstash/codecs/json_spooler.rb +22 -0
- data/lib/logstash/codecs/line.rb +58 -0
- data/lib/logstash/codecs/msgpack.rb +43 -0
- data/lib/logstash/codecs/multiline.rb +189 -0
- data/lib/logstash/codecs/netflow.rb +342 -0
- data/lib/logstash/codecs/netflow/util.rb +212 -0
- data/lib/logstash/codecs/noop.rb +19 -0
- data/lib/logstash/codecs/oldlogstashjson.rb +56 -0
- data/lib/logstash/codecs/plain.rb +48 -0
- data/lib/logstash/codecs/rubydebug.rb +22 -0
- data/lib/logstash/codecs/spool.rb +38 -0
- data/lib/logstash/config/Makefile +4 -0
- data/lib/logstash/config/config_ast.rb +380 -0
- data/lib/logstash/config/file.rb +39 -0
- data/lib/logstash/config/grammar.rb +3504 -0
- data/lib/logstash/config/grammar.treetop +241 -0
- data/lib/logstash/config/mixin.rb +464 -0
- data/lib/logstash/config/registry.rb +13 -0
- data/lib/logstash/config/test.conf +18 -0
- data/lib/logstash/errors.rb +10 -0
- data/lib/logstash/event.rb +262 -0
- data/lib/logstash/filters/advisor.rb +178 -0
- data/lib/logstash/filters/alter.rb +173 -0
- data/lib/logstash/filters/anonymize.rb +93 -0
- data/lib/logstash/filters/base.rb +190 -0
- data/lib/logstash/filters/checksum.rb +50 -0
- data/lib/logstash/filters/cidr.rb +76 -0
- data/lib/logstash/filters/cipher.rb +145 -0
- data/lib/logstash/filters/clone.rb +35 -0
- data/lib/logstash/filters/collate.rb +114 -0
- data/lib/logstash/filters/csv.rb +94 -0
- data/lib/logstash/filters/date.rb +244 -0
- data/lib/logstash/filters/dns.rb +201 -0
- data/lib/logstash/filters/drop.rb +32 -0
- data/lib/logstash/filters/elapsed.rb +256 -0
- data/lib/logstash/filters/elasticsearch.rb +73 -0
- data/lib/logstash/filters/environment.rb +27 -0
- data/lib/logstash/filters/extractnumbers.rb +84 -0
- data/lib/logstash/filters/gelfify.rb +52 -0
- data/lib/logstash/filters/geoip.rb +145 -0
- data/lib/logstash/filters/grep.rb +153 -0
- data/lib/logstash/filters/grok.rb +425 -0
- data/lib/logstash/filters/grokdiscovery.rb +75 -0
- data/lib/logstash/filters/i18n.rb +51 -0
- data/lib/logstash/filters/json.rb +90 -0
- data/lib/logstash/filters/json_encode.rb +52 -0
- data/lib/logstash/filters/kv.rb +232 -0
- data/lib/logstash/filters/metaevent.rb +68 -0
- data/lib/logstash/filters/metrics.rb +237 -0
- data/lib/logstash/filters/multiline.rb +241 -0
- data/lib/logstash/filters/mutate.rb +399 -0
- data/lib/logstash/filters/noop.rb +21 -0
- data/lib/logstash/filters/prune.rb +149 -0
- data/lib/logstash/filters/punct.rb +32 -0
- data/lib/logstash/filters/railsparallelrequest.rb +86 -0
- data/lib/logstash/filters/range.rb +142 -0
- data/lib/logstash/filters/ruby.rb +42 -0
- data/lib/logstash/filters/sleep.rb +111 -0
- data/lib/logstash/filters/split.rb +64 -0
- data/lib/logstash/filters/sumnumbers.rb +73 -0
- data/lib/logstash/filters/syslog_pri.rb +107 -0
- data/lib/logstash/filters/translate.rb +121 -0
- data/lib/logstash/filters/unique.rb +29 -0
- data/lib/logstash/filters/urldecode.rb +57 -0
- data/lib/logstash/filters/useragent.rb +112 -0
- data/lib/logstash/filters/uuid.rb +58 -0
- data/lib/logstash/filters/xml.rb +139 -0
- data/lib/logstash/filters/zeromq.rb +123 -0
- data/lib/logstash/filterworker.rb +122 -0
- data/lib/logstash/inputs/base.rb +125 -0
- data/lib/logstash/inputs/collectd.rb +306 -0
- data/lib/logstash/inputs/drupal_dblog.rb +323 -0
- data/lib/logstash/inputs/drupal_dblog/jdbcconnection.rb +66 -0
- data/lib/logstash/inputs/elasticsearch.rb +140 -0
- data/lib/logstash/inputs/eventlog.rb +129 -0
- data/lib/logstash/inputs/eventlog/racob_fix.rb +44 -0
- data/lib/logstash/inputs/exec.rb +69 -0
- data/lib/logstash/inputs/file.rb +146 -0
- data/lib/logstash/inputs/ganglia.rb +127 -0
- data/lib/logstash/inputs/ganglia/gmondpacket.rb +146 -0
- data/lib/logstash/inputs/ganglia/xdr.rb +327 -0
- data/lib/logstash/inputs/gelf.rb +138 -0
- data/lib/logstash/inputs/gemfire.rb +222 -0
- data/lib/logstash/inputs/generator.rb +97 -0
- data/lib/logstash/inputs/graphite.rb +41 -0
- data/lib/logstash/inputs/heroku.rb +51 -0
- data/lib/logstash/inputs/imap.rb +136 -0
- data/lib/logstash/inputs/irc.rb +84 -0
- data/lib/logstash/inputs/log4j.rb +136 -0
- data/lib/logstash/inputs/lumberjack.rb +53 -0
- data/lib/logstash/inputs/pipe.rb +57 -0
- data/lib/logstash/inputs/rabbitmq.rb +126 -0
- data/lib/logstash/inputs/rabbitmq/bunny.rb +118 -0
- data/lib/logstash/inputs/rabbitmq/hot_bunnies.rb +1 -0
- data/lib/logstash/inputs/rabbitmq/march_hare.rb +129 -0
- data/lib/logstash/inputs/redis.rb +263 -0
- data/lib/logstash/inputs/relp.rb +106 -0
- data/lib/logstash/inputs/s3.rb +279 -0
- data/lib/logstash/inputs/snmptrap.rb +87 -0
- data/lib/logstash/inputs/sqlite.rb +185 -0
- data/lib/logstash/inputs/sqs.rb +172 -0
- data/lib/logstash/inputs/stdin.rb +46 -0
- data/lib/logstash/inputs/stomp.rb +84 -0
- data/lib/logstash/inputs/syslog.rb +237 -0
- data/lib/logstash/inputs/tcp.rb +231 -0
- data/lib/logstash/inputs/threadable.rb +18 -0
- data/lib/logstash/inputs/twitter.rb +82 -0
- data/lib/logstash/inputs/udp.rb +81 -0
- data/lib/logstash/inputs/unix.rb +163 -0
- data/lib/logstash/inputs/varnishlog.rb +48 -0
- data/lib/logstash/inputs/websocket.rb +50 -0
- data/lib/logstash/inputs/wmi.rb +72 -0
- data/lib/logstash/inputs/xmpp.rb +81 -0
- data/lib/logstash/inputs/zenoss.rb +143 -0
- data/lib/logstash/inputs/zeromq.rb +165 -0
- data/lib/logstash/kibana.rb +113 -0
- data/lib/logstash/loadlibs.rb +9 -0
- data/lib/logstash/logging.rb +89 -0
- data/lib/logstash/monkeypatches-for-bugs.rb +2 -0
- data/lib/logstash/monkeypatches-for-debugging.rb +47 -0
- data/lib/logstash/monkeypatches-for-performance.rb +66 -0
- data/lib/logstash/multiqueue.rb +53 -0
- data/lib/logstash/namespace.rb +16 -0
- data/lib/logstash/outputs/base.rb +120 -0
- data/lib/logstash/outputs/boundary.rb +116 -0
- data/lib/logstash/outputs/circonus.rb +78 -0
- data/lib/logstash/outputs/cloudwatch.rb +351 -0
- data/lib/logstash/outputs/csv.rb +55 -0
- data/lib/logstash/outputs/datadog.rb +93 -0
- data/lib/logstash/outputs/datadog_metrics.rb +123 -0
- data/lib/logstash/outputs/elasticsearch.rb +332 -0
- data/lib/logstash/outputs/elasticsearch/elasticsearch-template.json +44 -0
- data/lib/logstash/outputs/elasticsearch_http.rb +256 -0
- data/lib/logstash/outputs/elasticsearch_river.rb +214 -0
- data/lib/logstash/outputs/email.rb +299 -0
- data/lib/logstash/outputs/exec.rb +40 -0
- data/lib/logstash/outputs/file.rb +180 -0
- data/lib/logstash/outputs/ganglia.rb +75 -0
- data/lib/logstash/outputs/gelf.rb +208 -0
- data/lib/logstash/outputs/gemfire.rb +103 -0
- data/lib/logstash/outputs/google_bigquery.rb +570 -0
- data/lib/logstash/outputs/google_cloud_storage.rb +431 -0
- data/lib/logstash/outputs/graphite.rb +143 -0
- data/lib/logstash/outputs/graphtastic.rb +185 -0
- data/lib/logstash/outputs/hipchat.rb +80 -0
- data/lib/logstash/outputs/http.rb +142 -0
- data/lib/logstash/outputs/irc.rb +80 -0
- data/lib/logstash/outputs/jira.rb +109 -0
- data/lib/logstash/outputs/juggernaut.rb +105 -0
- data/lib/logstash/outputs/librato.rb +146 -0
- data/lib/logstash/outputs/loggly.rb +93 -0
- data/lib/logstash/outputs/lumberjack.rb +51 -0
- data/lib/logstash/outputs/metriccatcher.rb +103 -0
- data/lib/logstash/outputs/mongodb.rb +81 -0
- data/lib/logstash/outputs/nagios.rb +119 -0
- data/lib/logstash/outputs/nagios_nsca.rb +123 -0
- data/lib/logstash/outputs/null.rb +18 -0
- data/lib/logstash/outputs/opentsdb.rb +101 -0
- data/lib/logstash/outputs/pagerduty.rb +79 -0
- data/lib/logstash/outputs/pipe.rb +132 -0
- data/lib/logstash/outputs/rabbitmq.rb +96 -0
- data/lib/logstash/outputs/rabbitmq/bunny.rb +135 -0
- data/lib/logstash/outputs/rabbitmq/hot_bunnies.rb +1 -0
- data/lib/logstash/outputs/rabbitmq/march_hare.rb +143 -0
- data/lib/logstash/outputs/redis.rb +245 -0
- data/lib/logstash/outputs/riak.rb +152 -0
- data/lib/logstash/outputs/riemann.rb +109 -0
- data/lib/logstash/outputs/s3.rb +356 -0
- data/lib/logstash/outputs/sns.rb +124 -0
- data/lib/logstash/outputs/solr_http.rb +78 -0
- data/lib/logstash/outputs/sqs.rb +141 -0
- data/lib/logstash/outputs/statsd.rb +116 -0
- data/lib/logstash/outputs/stdout.rb +53 -0
- data/lib/logstash/outputs/stomp.rb +67 -0
- data/lib/logstash/outputs/syslog.rb +145 -0
- data/lib/logstash/outputs/tcp.rb +145 -0
- data/lib/logstash/outputs/udp.rb +38 -0
- data/lib/logstash/outputs/websocket.rb +46 -0
- data/lib/logstash/outputs/websocket/app.rb +29 -0
- data/lib/logstash/outputs/websocket/pubsub.rb +45 -0
- data/lib/logstash/outputs/xmpp.rb +78 -0
- data/lib/logstash/outputs/zabbix.rb +108 -0
- data/lib/logstash/outputs/zeromq.rb +125 -0
- data/lib/logstash/pipeline.rb +286 -0
- data/lib/logstash/plugin.rb +150 -0
- data/lib/logstash/plugin_mixins/aws_config.rb +93 -0
- data/lib/logstash/program.rb +15 -0
- data/lib/logstash/runner.rb +238 -0
- data/lib/logstash/sized_queue.rb +8 -0
- data/lib/logstash/test.rb +183 -0
- data/lib/logstash/threadwatchdog.rb +37 -0
- data/lib/logstash/time_addon.rb +33 -0
- data/lib/logstash/util.rb +106 -0
- data/lib/logstash/util/buftok.rb +139 -0
- data/lib/logstash/util/charset.rb +39 -0
- data/lib/logstash/util/fieldreference.rb +50 -0
- data/lib/logstash/util/password.rb +25 -0
- data/lib/logstash/util/prctl.rb +11 -0
- data/lib/logstash/util/relp.rb +326 -0
- data/lib/logstash/util/require-helper.rb +18 -0
- data/lib/logstash/util/socket_peer.rb +7 -0
- data/lib/logstash/util/zenoss.rb +566 -0
- data/lib/logstash/util/zeromq.rb +47 -0
- data/lib/logstash/version.rb +6 -0
- data/locales/en.yml +170 -0
- data/logstash-event.gemspec +29 -0
- data/logstash.gemspec +128 -0
- data/patterns/firewalls +60 -0
- data/patterns/grok-patterns +91 -0
- data/patterns/haproxy +37 -0
- data/patterns/java +3 -0
- data/patterns/linux-syslog +14 -0
- data/patterns/mcollective +1 -0
- data/patterns/mcollective-patterns +4 -0
- data/patterns/nagios +108 -0
- data/patterns/postgresql +3 -0
- data/patterns/redis +3 -0
- data/patterns/ruby +2 -0
- data/pkg/build.sh +135 -0
- data/pkg/centos/after-install.sh +1 -0
- data/pkg/centos/before-install.sh +10 -0
- data/pkg/centos/before-remove.sh +11 -0
- data/pkg/centos/sysconfig +15 -0
- data/pkg/debian/after-install.sh +5 -0
- data/pkg/debian/before-install.sh +13 -0
- data/pkg/debian/before-remove.sh +13 -0
- data/pkg/debian/build.sh +34 -0
- data/pkg/debian/debian/README +6 -0
- data/pkg/debian/debian/changelog +17 -0
- data/pkg/debian/debian/compat +1 -0
- data/pkg/debian/debian/control +16 -0
- data/pkg/debian/debian/copyright +27 -0
- data/pkg/debian/debian/dirs +19 -0
- data/pkg/debian/debian/docs +0 -0
- data/pkg/debian/debian/logstash.default +39 -0
- data/pkg/debian/debian/logstash.init +201 -0
- data/pkg/debian/debian/logstash.install +1 -0
- data/pkg/debian/debian/logstash.logrotate +9 -0
- data/pkg/debian/debian/logstash.postinst +68 -0
- data/pkg/debian/debian/logstash.postrm +23 -0
- data/pkg/debian/debian/manpage.1.ex +59 -0
- data/pkg/debian/debian/preinst.ex +37 -0
- data/pkg/debian/debian/prerm.ex +40 -0
- data/pkg/debian/debian/release.conf +5 -0
- data/pkg/debian/debian/rules +80 -0
- data/pkg/debian/debian/watch.ex +22 -0
- data/pkg/logrotate.conf +8 -0
- data/pkg/logstash-web.default +41 -0
- data/pkg/logstash-web.sysv.debian +201 -0
- data/pkg/logstash-web.upstart.ubuntu +18 -0
- data/pkg/logstash.default +45 -0
- data/pkg/logstash.sysv.debian +202 -0
- data/pkg/logstash.sysv.redhat +158 -0
- data/pkg/logstash.upstart.ubuntu +20 -0
- data/pkg/rpm/SOURCES/logstash.conf +26 -0
- data/pkg/rpm/SOURCES/logstash.init +80 -0
- data/pkg/rpm/SOURCES/logstash.logrotate +8 -0
- data/pkg/rpm/SOURCES/logstash.sysconfig +3 -0
- data/pkg/rpm/SOURCES/logstash.wrapper +105 -0
- data/pkg/rpm/SPECS/logstash.spec +180 -0
- data/pkg/rpm/readme.md +4 -0
- data/pkg/ubuntu/after-install.sh +7 -0
- data/pkg/ubuntu/before-install.sh +12 -0
- data/pkg/ubuntu/before-remove.sh +13 -0
- data/pull_release_note.rb +25 -0
- data/require-analyze.rb +22 -0
- data/spec/README.md +14 -0
- data/spec/codecs/edn.rb +40 -0
- data/spec/codecs/edn_lines.rb +53 -0
- data/spec/codecs/graphite.rb +96 -0
- data/spec/codecs/json.rb +57 -0
- data/spec/codecs/json_lines.rb +51 -0
- data/spec/codecs/json_spooler.rb +43 -0
- data/spec/codecs/msgpack.rb +39 -0
- data/spec/codecs/multiline.rb +60 -0
- data/spec/codecs/oldlogstashjson.rb +55 -0
- data/spec/codecs/plain.rb +35 -0
- data/spec/codecs/spool.rb +35 -0
- data/spec/conditionals/test.rb +323 -0
- data/spec/config.rb +31 -0
- data/spec/event.rb +165 -0
- data/spec/examples/fail2ban.rb +28 -0
- data/spec/examples/graphite-input.rb +41 -0
- data/spec/examples/mysql-slow-query.rb +70 -0
- data/spec/examples/parse-apache-logs.rb +66 -0
- data/spec/examples/parse-haproxy-logs.rb +115 -0
- data/spec/examples/syslog.rb +48 -0
- data/spec/filters/alter.rb +96 -0
- data/spec/filters/anonymize.rb +189 -0
- data/spec/filters/checksum.rb +41 -0
- data/spec/filters/clone.rb +67 -0
- data/spec/filters/collate.rb +122 -0
- data/spec/filters/csv.rb +174 -0
- data/spec/filters/date.rb +285 -0
- data/spec/filters/date_performance.rb +31 -0
- data/spec/filters/dns.rb +159 -0
- data/spec/filters/drop.rb +19 -0
- data/spec/filters/elapsed.rb +294 -0
- data/spec/filters/environment.rb +43 -0
- data/spec/filters/geoip.rb +62 -0
- data/spec/filters/grep.rb +342 -0
- data/spec/filters/grok.rb +473 -0
- data/spec/filters/grok/timeout2.rb +56 -0
- data/spec/filters/grok/timeouts.rb +39 -0
- data/spec/filters/i18n.rb +25 -0
- data/spec/filters/json.rb +72 -0
- data/spec/filters/json_encode.rb +37 -0
- data/spec/filters/kv.rb +403 -0
- data/spec/filters/metrics.rb +212 -0
- data/spec/filters/multiline.rb +119 -0
- data/spec/filters/mutate.rb +180 -0
- data/spec/filters/noop.rb +221 -0
- data/spec/filters/prune.rb +441 -0
- data/spec/filters/punct.rb +18 -0
- data/spec/filters/railsparallelrequest.rb +112 -0
- data/spec/filters/range.rb +169 -0
- data/spec/filters/split.rb +58 -0
- data/spec/filters/translate.rb +70 -0
- data/spec/filters/unique.rb +25 -0
- data/spec/filters/useragent.rb +42 -0
- data/spec/filters/xml.rb +157 -0
- data/spec/inputs/file.rb +107 -0
- data/spec/inputs/gelf.rb +52 -0
- data/spec/inputs/generator.rb +30 -0
- data/spec/inputs/imap.rb +60 -0
- data/spec/inputs/redis.rb +63 -0
- data/spec/inputs/relp.rb +70 -0
- data/spec/inputs/tcp.rb +101 -0
- data/spec/jar.rb +21 -0
- data/spec/outputs/csv.rb +266 -0
- data/spec/outputs/elasticsearch.rb +161 -0
- data/spec/outputs/elasticsearch_http.rb +240 -0
- data/spec/outputs/email.rb +173 -0
- data/spec/outputs/file.rb +82 -0
- data/spec/outputs/graphite.rb +236 -0
- data/spec/outputs/redis.rb +127 -0
- data/spec/speed.rb +20 -0
- data/spec/sqlite-test.rb +81 -0
- data/spec/support/LOGSTASH-733.rb +21 -0
- data/spec/support/LOGSTASH-820.rb +25 -0
- data/spec/support/akamai-grok.rb +26 -0
- data/spec/support/date-http.rb +17 -0
- data/spec/support/postwait1.rb +26 -0
- data/spec/support/pull375.rb +21 -0
- data/spec/test_utils.rb +125 -0
- data/spec/util/fieldeval_spec.rb +44 -0
- data/test/jenkins/config.xml.erb +74 -0
- data/test/jenkins/create-jobs.rb +23 -0
- data/test/jenkins/generatorjob.config.xml +66 -0
- data/tools/Gemfile +14 -0
- data/tools/Gemfile.jruby-1.9.lock +322 -0
- data/tools/Gemfile.rbx-2.1.lock +516 -0
- data/tools/Gemfile.ruby-1.9.1.lock +310 -0
- data/tools/Gemfile.ruby-2.0.0.lock +310 -0
- metadata +629 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
require "logstash/namespace"
|
|
3
|
+
require "logstash/logging"
|
|
4
|
+
require "logstash/config/mixin"
|
|
5
|
+
require "cabin"
|
|
6
|
+
|
|
7
|
+
class LogStash::Plugin
|
|
8
|
+
attr_accessor :params
|
|
9
|
+
attr_accessor :logger
|
|
10
|
+
|
|
11
|
+
public
|
|
12
|
+
def hash
|
|
13
|
+
params.hash ^
|
|
14
|
+
self.class.name.hash
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
public
|
|
18
|
+
def eql?(other)
|
|
19
|
+
self.class.name == other.class.name && @params == other.params
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
public
|
|
23
|
+
def initialize(params=nil)
|
|
24
|
+
@params = params
|
|
25
|
+
@logger = Cabin::Channel.get(LogStash)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# This method is called when someone or something wants this plugin to shut
|
|
29
|
+
# down. When you successfully shutdown, you must call 'finished'
|
|
30
|
+
# You must also call 'super' in any subclasses.
|
|
31
|
+
public
|
|
32
|
+
def shutdown(queue)
|
|
33
|
+
# By default, shutdown is assumed a no-op for all plugins.
|
|
34
|
+
# If you need to take special efforts to shutdown (like waiting for
|
|
35
|
+
# an operation to complete, etc)
|
|
36
|
+
teardown
|
|
37
|
+
@logger.info("Received shutdown signal", :plugin => self)
|
|
38
|
+
|
|
39
|
+
@shutdown_queue = queue
|
|
40
|
+
if @plugin_state == :finished
|
|
41
|
+
finished
|
|
42
|
+
else
|
|
43
|
+
@plugin_state = :terminating
|
|
44
|
+
end
|
|
45
|
+
end # def shutdown
|
|
46
|
+
|
|
47
|
+
# You should call this method when you (the plugin) are done with work
|
|
48
|
+
# forever.
|
|
49
|
+
public
|
|
50
|
+
def finished
|
|
51
|
+
# TODO(sissel): I'm not sure what I had planned for this shutdown_queue
|
|
52
|
+
# thing
|
|
53
|
+
if @shutdown_queue
|
|
54
|
+
@logger.info("Sending shutdown event to agent queue", :plugin => self)
|
|
55
|
+
@shutdown_queue << self
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
if @plugin_state != :finished
|
|
59
|
+
@logger.info("Plugin is finished", :plugin => self)
|
|
60
|
+
@plugin_state = :finished
|
|
61
|
+
end
|
|
62
|
+
end # def finished
|
|
63
|
+
|
|
64
|
+
# Subclasses should implement this teardown method if you need to perform any
|
|
65
|
+
# special tasks during shutdown (like flushing, etc.)
|
|
66
|
+
public
|
|
67
|
+
def teardown
|
|
68
|
+
# nothing by default
|
|
69
|
+
finished
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# This method is called when a SIGHUP triggers a reload operation
|
|
73
|
+
public
|
|
74
|
+
def reload
|
|
75
|
+
# Do nothing by default
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
public
|
|
79
|
+
def finished?
|
|
80
|
+
return @plugin_state == :finished
|
|
81
|
+
end # def finished?
|
|
82
|
+
|
|
83
|
+
public
|
|
84
|
+
def running?
|
|
85
|
+
return @plugin_state != :finished
|
|
86
|
+
end # def finished?
|
|
87
|
+
|
|
88
|
+
public
|
|
89
|
+
def terminating?
|
|
90
|
+
return @plugin_state == :terminating
|
|
91
|
+
end # def terminating?
|
|
92
|
+
|
|
93
|
+
public
|
|
94
|
+
def to_s
|
|
95
|
+
return "#{self.class.name}: #{@params}"
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
protected
|
|
99
|
+
def update_watchdog(state)
|
|
100
|
+
Thread.current[:watchdog] = Time.now
|
|
101
|
+
Thread.current[:watchdog_state] = state
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
protected
|
|
105
|
+
def clear_watchdog
|
|
106
|
+
Thread.current[:watchdog] = nil
|
|
107
|
+
Thread.current[:watchdog_state] = nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
public
|
|
111
|
+
def inspect
|
|
112
|
+
if !@config.nil?
|
|
113
|
+
description = @config \
|
|
114
|
+
.select { |k,v| !v.nil? && (v.respond_to?(:empty?) && !v.empty?) } \
|
|
115
|
+
.collect { |k,v| "#{k}=>#{v.inspect}" }
|
|
116
|
+
return "<#{self.class.name} #{description.join(", ")}>"
|
|
117
|
+
else
|
|
118
|
+
return "<#{self.class.name} --->"
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Look up a plugin by type and name.
|
|
123
|
+
public
|
|
124
|
+
def self.lookup(type, name)
|
|
125
|
+
# Try to load the plugin requested.
|
|
126
|
+
# For example, load("filter", "grok") will try to require
|
|
127
|
+
# logstash/filters/grok
|
|
128
|
+
#
|
|
129
|
+
# And expects to find LogStash::Filters::Grok (or something similar based
|
|
130
|
+
# on pattern matching
|
|
131
|
+
path = "logstash/#{type}s/#{name}"
|
|
132
|
+
require(path)
|
|
133
|
+
|
|
134
|
+
base = LogStash.const_get("#{type.capitalize}s")
|
|
135
|
+
klass = nil
|
|
136
|
+
#klass_sym = base.constants.find { |c| c.to_s =~ /^#{Regexp.quote(name)}$/i }
|
|
137
|
+
#if klass_sym.nil?
|
|
138
|
+
|
|
139
|
+
# Look for a plugin by the config_name
|
|
140
|
+
klass_sym = base.constants.find { |k| base.const_get(k).config_name == name }
|
|
141
|
+
klass = base.const_get(klass_sym)
|
|
142
|
+
|
|
143
|
+
raise LoadError if klass.nil?
|
|
144
|
+
|
|
145
|
+
return klass
|
|
146
|
+
rescue LoadError => e
|
|
147
|
+
raise LogStash::PluginLoadingError,
|
|
148
|
+
I18n.t("logstash.pipeline.plugin-loading-error", :type => type, :name => name, :path => path, :error => e.to_s)
|
|
149
|
+
end # def load
|
|
150
|
+
end # class LogStash::Plugin
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
require "logstash/config/mixin"
|
|
3
|
+
|
|
4
|
+
module LogStash::PluginMixins::AwsConfig
|
|
5
|
+
|
|
6
|
+
@logger = Cabin::Channel.get(LogStash)
|
|
7
|
+
|
|
8
|
+
# This method is called when someone includes this module
|
|
9
|
+
def self.included(base)
|
|
10
|
+
# Add these methods to the 'base' given.
|
|
11
|
+
base.extend(self)
|
|
12
|
+
base.setup_aws_config
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
US_EAST_1 = "us-east-1"
|
|
16
|
+
|
|
17
|
+
public
|
|
18
|
+
def setup_aws_config
|
|
19
|
+
# The AWS Region
|
|
20
|
+
config :region, :validate => [US_EAST_1, "us-west-1", "us-west-2",
|
|
21
|
+
"eu-west-1", "ap-southeast-1", "ap-southeast-2",
|
|
22
|
+
"ap-northeast-1", "sa-east-1", "us-gov-west-1"], :default => US_EAST_1
|
|
23
|
+
|
|
24
|
+
# This plugin uses the AWS SDK and supports several ways to get credentials, which will be tried in this order...
|
|
25
|
+
# 1. Static configuration, using `access_key_id` and `secret_access_key` params in logstash plugin config
|
|
26
|
+
# 2. External credentials file specified by `aws_credentials_file`
|
|
27
|
+
# 3. Environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`
|
|
28
|
+
# 4. Environment variables `AMAZON_ACCESS_KEY_ID` and `AMAZON_SECRET_ACCESS_KEY`
|
|
29
|
+
# 5. IAM Instance Profile (available when running inside EC2)
|
|
30
|
+
config :access_key_id, :validate => :string
|
|
31
|
+
|
|
32
|
+
# The AWS Secret Access Key
|
|
33
|
+
config :secret_access_key, :validate => :string
|
|
34
|
+
|
|
35
|
+
# Should we require (true) or disable (false) using SSL for communicating with the AWS API
|
|
36
|
+
# The AWS SDK for Ruby defaults to SSL so we preserve that
|
|
37
|
+
config :use_ssl, :validate => :boolean, :default => true
|
|
38
|
+
|
|
39
|
+
# URI to proxy server if required
|
|
40
|
+
config :proxy_uri, :validate => :string
|
|
41
|
+
|
|
42
|
+
# Path to YAML file containing a hash of AWS credentials.
|
|
43
|
+
# This file will only be loaded if `access_key_id` and
|
|
44
|
+
# `secret_access_key` aren't set. The contents of the
|
|
45
|
+
# file should look like this:
|
|
46
|
+
#
|
|
47
|
+
# :access_key_id: "12345"
|
|
48
|
+
# :secret_access_key: "54321"
|
|
49
|
+
#
|
|
50
|
+
config :aws_credentials_file, :validate => :string
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
public
|
|
54
|
+
def aws_options_hash
|
|
55
|
+
if @access_key_id.is_a?(NilClass) ^ @secret_access_key.is_a?(NilClass)
|
|
56
|
+
@logger.warn("Likely config error: Only one of access_key_id or secret_access_key was provided but not both.")
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if ((!@access_key_id || !@secret_access_key)) && @aws_credentials_file
|
|
60
|
+
access_creds = YAML.load_file(@aws_credentials_file)
|
|
61
|
+
|
|
62
|
+
@access_key_id = access_creds[:access_key_id]
|
|
63
|
+
@secret_access_key = access_creds[:secret_access_key]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
opts = {}
|
|
67
|
+
|
|
68
|
+
if (@access_key_id && @secret_access_key)
|
|
69
|
+
opts[:access_key_id] = @access_key_id
|
|
70
|
+
opts[:secret_access_key] = @secret_access_key
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
opts[:use_ssl] = @use_ssl
|
|
74
|
+
|
|
75
|
+
if (@proxy_uri)
|
|
76
|
+
opts[:proxy_uri] = @proxy_uri
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# The AWS SDK for Ruby doesn't know how to make an endpoint hostname from a region
|
|
80
|
+
# for example us-west-1 -> foosvc.us-west-1.amazonaws.com
|
|
81
|
+
# So our plugins need to know how to generate their endpoints from a region
|
|
82
|
+
# Furthermore, they need to know the symbol required to set that value in the AWS SDK
|
|
83
|
+
# Classes using this module must implement aws_service_endpoint(region:string)
|
|
84
|
+
# which must return a hash with one key, the aws sdk for ruby config symbol of the service
|
|
85
|
+
# endpoint, which has a string value of the service endpoint hostname
|
|
86
|
+
# for example, CloudWatch, { :cloud_watch_endpoint => "monitoring.#{region}.amazonaws.com" }
|
|
87
|
+
# For a list, see https://github.com/aws/aws-sdk-ruby/blob/master/lib/aws/core/configuration.rb
|
|
88
|
+
opts.merge!(self.aws_service_endpoint(@region))
|
|
89
|
+
|
|
90
|
+
return opts
|
|
91
|
+
end # def aws_options_hash
|
|
92
|
+
|
|
93
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
require "logstash/namespace"
|
|
4
|
+
|
|
5
|
+
module LogStash::Program
|
|
6
|
+
public
|
|
7
|
+
def exit(value)
|
|
8
|
+
if RUBY_ENGINE == "jruby"
|
|
9
|
+
# Kernel::exit() in jruby just tosses an exception? Let's actually exit.
|
|
10
|
+
Java::java.lang.System.exit(value)
|
|
11
|
+
else
|
|
12
|
+
Kernel::exit(value)
|
|
13
|
+
end
|
|
14
|
+
end # def exit
|
|
15
|
+
end # module LogStash::Program
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
Encoding.default_external = "UTF-8"
|
|
4
|
+
$START = Time.now
|
|
5
|
+
$DEBUGLIST = (ENV["DEBUG"] || "").split(",")
|
|
6
|
+
|
|
7
|
+
Thread.abort_on_exception = true
|
|
8
|
+
if ENV["PROFILE_BAD_LOG_CALLS"] || $DEBUGLIST.include?("log")
|
|
9
|
+
# Set PROFILE_BAD_LOG_CALLS=1 in your environment if you want
|
|
10
|
+
# to track down logger calls that cause performance problems
|
|
11
|
+
#
|
|
12
|
+
# Related research here:
|
|
13
|
+
# https://github.com/jordansissel/experiments/tree/master/ruby/logger-string-vs-block
|
|
14
|
+
#
|
|
15
|
+
# Basically, the following is wastes tons of effort creating objects that are
|
|
16
|
+
# never used if the log level hides the log:
|
|
17
|
+
#
|
|
18
|
+
# logger.debug("something happend", :what => Happened)
|
|
19
|
+
#
|
|
20
|
+
# This is shown to be 4x faster:
|
|
21
|
+
#
|
|
22
|
+
# logger.debug(...) if logger.debug?
|
|
23
|
+
#
|
|
24
|
+
# I originally intended to use RubyParser and SexpProcessor to
|
|
25
|
+
# process all the logstash ruby code offline, but it was much
|
|
26
|
+
# faster to write this monkeypatch to warn as things are called.
|
|
27
|
+
require "cabin/mixins/logger"
|
|
28
|
+
module Cabin::Mixins::Logger
|
|
29
|
+
LEVELS.keys.each do |level|
|
|
30
|
+
m = "original_#{level}".to_sym
|
|
31
|
+
predicate = "#{level}?".to_sym
|
|
32
|
+
alias_method m, level
|
|
33
|
+
define_method(level) do |*args|
|
|
34
|
+
if !send(predicate)
|
|
35
|
+
warn("Unconditional log call", :location => caller[0])
|
|
36
|
+
end
|
|
37
|
+
send(m, *args)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end # PROFILE_BAD_LOG_CALLS
|
|
42
|
+
|
|
43
|
+
if __FILE__ =~ /^(jar:)?file:\//
|
|
44
|
+
require "logstash/monkeypatches-for-performance"
|
|
45
|
+
end
|
|
46
|
+
require "logstash/monkeypatches-for-bugs"
|
|
47
|
+
require "logstash/monkeypatches-for-debugging"
|
|
48
|
+
require "logstash/namespace"
|
|
49
|
+
require "logstash/program"
|
|
50
|
+
require "i18n" # gem 'i18n'
|
|
51
|
+
I18n.enforce_available_locales = true
|
|
52
|
+
I18n.load_path << File.expand_path(
|
|
53
|
+
File.join(File.dirname(__FILE__), "../../locales/en.yml")
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
class LogStash::Runner
|
|
57
|
+
include LogStash::Program
|
|
58
|
+
|
|
59
|
+
def main(args)
|
|
60
|
+
require "logstash/util"
|
|
61
|
+
require "stud/trap"
|
|
62
|
+
require "stud/task"
|
|
63
|
+
@startup_interruption_trap = Stud::trap("INT") { puts "Interrupted"; exit 0 }
|
|
64
|
+
|
|
65
|
+
LogStash::Util::set_thread_name(self.class.name)
|
|
66
|
+
#$LOAD_PATH << File.join(File.dirname(__FILE__), "..")
|
|
67
|
+
|
|
68
|
+
if RUBY_VERSION < "1.9.2"
|
|
69
|
+
$stderr.puts "Ruby 1.9.2 or later is required. (You are running: " + RUBY_VERSION + ")"
|
|
70
|
+
return 1
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
Stud::untrap("INT", @startup_interruption_trap)
|
|
74
|
+
|
|
75
|
+
args = [nil] if args.empty?
|
|
76
|
+
|
|
77
|
+
@runners = []
|
|
78
|
+
while args != nil && !args.empty?
|
|
79
|
+
args = run(args)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
status = []
|
|
83
|
+
@runners.each do |r|
|
|
84
|
+
#$stderr.puts "Waiting on #{r.wait.inspect}"
|
|
85
|
+
status << r.wait
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Avoid running test/unit's at_exit crap
|
|
89
|
+
if status.empty? || status.first.nil?
|
|
90
|
+
exit(0)
|
|
91
|
+
else
|
|
92
|
+
exit(status.first)
|
|
93
|
+
end
|
|
94
|
+
end # def self.main
|
|
95
|
+
|
|
96
|
+
def run(args)
|
|
97
|
+
command = args.shift
|
|
98
|
+
commands = {
|
|
99
|
+
"version" => lambda do
|
|
100
|
+
require "logstash/agent"
|
|
101
|
+
agent_args = ["--version"]
|
|
102
|
+
if args.include?("--verbose")
|
|
103
|
+
agent_args << "--verbose"
|
|
104
|
+
end
|
|
105
|
+
LogStash::Agent.run($0, agent_args)
|
|
106
|
+
return []
|
|
107
|
+
end,
|
|
108
|
+
"web" => lambda do
|
|
109
|
+
# Give them kibana.
|
|
110
|
+
require "logstash/kibana"
|
|
111
|
+
kibana = LogStash::Kibana::Runner.new
|
|
112
|
+
@runners << kibana
|
|
113
|
+
return kibana.run(args)
|
|
114
|
+
end,
|
|
115
|
+
"test" => lambda do
|
|
116
|
+
$LOAD_PATH << File.join(File.dirname(__FILE__), "..", "..", "test")
|
|
117
|
+
require "logstash/test"
|
|
118
|
+
test = LogStash::Test.new
|
|
119
|
+
@runners << test
|
|
120
|
+
return test.run(args)
|
|
121
|
+
end,
|
|
122
|
+
"rspec" => lambda do
|
|
123
|
+
require "rspec/core/runner"
|
|
124
|
+
require "rspec"
|
|
125
|
+
fixedargs = args.collect do |arg|
|
|
126
|
+
# if the arg ends in .rb or has a "/" in it, assume it's a path.
|
|
127
|
+
if arg =~ /\.rb$/ || arg =~ /\//
|
|
128
|
+
# check if it's a file, if not, try inside the jar if we are in it.
|
|
129
|
+
if !File.exists?(arg) && __FILE__ =~ /file:.*\.jar!\//
|
|
130
|
+
# Try inside the jar.
|
|
131
|
+
jar_root = __FILE__.gsub(/!.*/,"!")
|
|
132
|
+
newpath = File.join(jar_root, arg)
|
|
133
|
+
|
|
134
|
+
# Strip leading 'jar:' path (JRUBY_6970)
|
|
135
|
+
newpath.gsub!(/^jar:/, "")
|
|
136
|
+
if File.exists?(newpath)
|
|
137
|
+
# Add the 'spec' dir to the load path so specs can run
|
|
138
|
+
specpath = File.join(jar_root, "spec")
|
|
139
|
+
$LOAD_PATH << specpath unless $LOAD_PATH.include?(specpath)
|
|
140
|
+
next newpath
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
next arg
|
|
145
|
+
end # args.collect
|
|
146
|
+
|
|
147
|
+
# Hack up a runner
|
|
148
|
+
runner = Class.new do
|
|
149
|
+
def initialize(args)
|
|
150
|
+
@args = args
|
|
151
|
+
end
|
|
152
|
+
def run
|
|
153
|
+
@thread = Thread.new do
|
|
154
|
+
@result = RSpec::Core::Runner.run(@args)
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
def wait
|
|
158
|
+
@thread.join
|
|
159
|
+
return @result
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
$LOAD_PATH << File.expand_path("#{File.dirname(__FILE__)}/../../spec")
|
|
164
|
+
require "test_utils"
|
|
165
|
+
#p :args => fixedargs
|
|
166
|
+
rspec = runner.new(fixedargs)
|
|
167
|
+
rspec.run
|
|
168
|
+
@runners << rspec
|
|
169
|
+
return []
|
|
170
|
+
end,
|
|
171
|
+
"irb" => lambda do
|
|
172
|
+
require "irb"
|
|
173
|
+
IRB.start(__FILE__)
|
|
174
|
+
return []
|
|
175
|
+
end,
|
|
176
|
+
"ruby" => lambda do
|
|
177
|
+
require(args[0])
|
|
178
|
+
return []
|
|
179
|
+
end,
|
|
180
|
+
"pry" => lambda do
|
|
181
|
+
require "pry"
|
|
182
|
+
return binding.pry
|
|
183
|
+
end,
|
|
184
|
+
"agent" => lambda do
|
|
185
|
+
require "logstash/agent"
|
|
186
|
+
# Hack up a runner
|
|
187
|
+
agent = LogStash::Agent.new($0)
|
|
188
|
+
begin
|
|
189
|
+
agent.parse(args)
|
|
190
|
+
rescue Clamp::HelpWanted => e
|
|
191
|
+
puts e.command.help
|
|
192
|
+
rescue Clamp::UsageError => e
|
|
193
|
+
# If 'too many arguments' then give the arguments to
|
|
194
|
+
# the next command. Otherwise it's a real error.
|
|
195
|
+
raise if e.message != "too many arguments"
|
|
196
|
+
remaining = agent.remaining_arguments
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
#require "pry"
|
|
200
|
+
#binding.pry
|
|
201
|
+
@runners << Stud::Task.new { agent.execute }
|
|
202
|
+
return remaining
|
|
203
|
+
end
|
|
204
|
+
} # commands
|
|
205
|
+
|
|
206
|
+
if commands.include?(command)
|
|
207
|
+
args = commands[command].call
|
|
208
|
+
else
|
|
209
|
+
if command.nil?
|
|
210
|
+
$stderr.puts "No command given"
|
|
211
|
+
else
|
|
212
|
+
if !%w(--help -h help).include?(command)
|
|
213
|
+
# Emit 'no such command' if it's not someone asking for help.
|
|
214
|
+
$stderr.puts "No such command #{command.inspect}"
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
$stderr.puts "Usage: logstash <command> [command args]"
|
|
218
|
+
$stderr.puts "Run a command with the --help flag to see the arguments."
|
|
219
|
+
$stderr.puts "For example: logstash agent --help"
|
|
220
|
+
$stderr.puts
|
|
221
|
+
# hardcode the available commands to reduce confusion.
|
|
222
|
+
$stderr.puts "Available commands:"
|
|
223
|
+
$stderr.puts " agent - runs the logstash agent"
|
|
224
|
+
$stderr.puts " version - emits version info about this logstash"
|
|
225
|
+
$stderr.puts " web - runs the logstash web ui (called Kibana)"
|
|
226
|
+
$stderr.puts " rspec - runs tests"
|
|
227
|
+
#$stderr.puts commands.keys.map { |s| " #{s}" }.join("\n")
|
|
228
|
+
exit 1
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
return args
|
|
232
|
+
end # def run
|
|
233
|
+
|
|
234
|
+
end # class LogStash::Runner
|
|
235
|
+
|
|
236
|
+
if $0 == __FILE__
|
|
237
|
+
LogStash::Runner.new.main(ARGV)
|
|
238
|
+
end
|