Socket
Book a DemoInstallSign in
Socket

logstash-input-google-analytics-daily

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logstash-input-google-analytics-daily

0.7.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

Logstash Plugin

Logstash plugin to pull daily reports from the Google Analytics v3 Core Reporting API.

Forked from https://github.com/russorat/logstash-input-googleanalytics.git.

Documentation

Documentation can be seen in the docs folder (for now). Hopefully, this moves to logstash-plugins repo soon, so it can be rendered properly on elastic.co,

Developing

1. Plugin Development and Testing

Code

  • To get started, you'll need JRuby with the Bundler gem installed (jruby -S gem install bundler).

  • Install dependencies

jruby -S bundle install

Test

  • Run tests
jruby -S bundle exec rspec

Running your plugin locally in Logstash

Linking the gem

  • Edit Logstash's Gemfile and add the local plugin path, for example:
gem "logstash-input-google-analytics-daily", :path => "/your/local/logstash-input-googleanalytics"
  • Install the plugin
bin/plugin install --no-verify
  • Run Logstash with your plugin Example logstash.conf:
input {
  google_analytics_daily {
    view_id => "ga:62549480"
    metrics =>  ["ga:users","ga:sessions"]
    key_file_path => "C:/logstash-7.6.1/keyfile.json"
    dates => ['yesterday', '2020-04-05']
    dimensions => ['ga:browser', 'ga:city']
  }
}

output {
  stdout {
    codec => rubydebug
  }
}
bin/logstash -f logstash.conf

NOTE: Any modifications to the plugin code will not show up until you restart Logstash.

2.2 Run in an installed Logstash

Logstash by editing its Gemfile and pointing the :path to your local plugin development directory or you can build the gem and install it using:

  • Build your plugin gem
jruby -S gem build logstash-input-google-analytics-daily.gemspec
  • Install the plugin from the Logstash home
bin/plugin install  install Projects/logstash-input-google-analytics-daily/logstash-input-google-analytics-daily-1.0.0.gem
  • Start Logstash with your pipeline config:
bin/logstash -f logstash.conf

FAQs

Package last updated on 21 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.