/fluent-plugin-festival

Fluentd Input Plugin for FESTIVAL platform

Primary LanguageRubyApache License 2.0Apache-2.0

fluent-plugin-festival

Fluentd Input Plugin for FESTIVAL platform

What is FESTIVAL?

The development of the Internet of Things is set to have a strong impact on many aspects of society. Test-beds and experimental facilities, both of small scale and up to city scale, will be an essential enabler to facilitate the development of this vision. Facilitating the access to these test-beds to a large community of experimenters approach is a key asset to the development of a large and active community of application developers, necessary to address the many challenges faced by European and Japanese societies.

FESTIVAL project’s vision is to provide IoT experimentation platforms providing interaction facility with physical environments and end-users, where experimenters can validate their Smart ICT service developments in various domains such as smart city, smart building, smart public services, smart shopping, participatory sensing, etc. FESTIVAL testbeds will connect cyber world to the physical world, from large scale deployments at a city scale, to small platforms in lab environments and dedicated physical spaces simulating real-life settings. Those platforms will be connected and federated via homogeneous access APIs with an “Experimentation as a Service” (EaaS) model for experimenters to test their added value services.

fluent-plugin-festival provides input plugin for FESTIVAL platform.

Installation

gem install fluent-plugin-festival

fluent-plugin-festival requires Ruby version >= 2.1.0.

Usage

fluent-plugin-festival has Input Plugins for FESTIVAL platform.

Input Plugin (Fluent::FestivalInput)

Input Plugin can receive events from FESTIVAL EaaS API Server. It can be used via source directive in the configuration. Since FESTIVAL platform requires an authentication, before subscribing resource information, the user needs to create own FESTIVAL platform account via FESTIVAL portal. After creating an account, please make a configuration file with source directive. detail options of source directive is as follows.

<source>
  @type festival
  tag tag_name
  username festival_portal_login_name
  password festival_portal_password
  polling_interval 30
  <resource>
    path /aggregators/IOT-0/testbeds/jose/resources/hyogo001_barometer-info-value/current_data
  </resource>
  <resource>
    path /aggregators/IOT-0/testbeds/jose/resources/kyoto001_barometer-info-value/current_data
  </resource>
</source>

<source>
  @type festival
  tag tag_name
  username festival_portal_login_name
  password festival_portal_password
  polling_interval 180
  <resource>
    path /aggregators/IOT-0/testbeds/smartsantander/resources/smartsantander_u7jcfa_f3176-chemicalAgentAtmosphericConcentration:airParticles-sensor/current_data
  </resource>
</source>
  • tag (required): Tag name appended to the input data inside fluentd network
  • login_name (required): login_name to login https://experiments.festival-project.eu/
  • password (required): password for the login_name
  • polling_interval (optional): Polling interval (seconds) for accessing EaaS API (default: 60 seconds)
  • resource (at least one entry is required): The target resources to obtain sensor data. multiple resources can be specified by multiple tags. If a user wants to specify different polling interval for each resource, it must be specified different tags.
    • path (at least one entry is required): The target resource path name should be specified. The pathname should specify only under aggregator part and target data type. Currently, only "current_data" type is supported. (e.g. /aggregators/IOT-0/testbeds/jose/resources/hyogo001_barometer-info-value/current_data).

If the time field is empty, this plugin automatically set the finished time of data downloading. If multiple sensor data specified simultaneously, the time difference may become larger than single datum case. A sample data format is shown below.

{
  "resourceName": "/aggregators/IOT-0/testbeds/jose/resources/hyogo001_barometer-info-value/current_data",
  "dataValue": "1001.16"
}

Contributing

  1. Fork it ( http://github.com/toyokazu/fluent-plugin-festival/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

The gem is available as open source under the terms of the Apache License Version 2.0.