h1. Fluent::Plugin::CloudStack Fluentd input plugin to get usages and events from CloudStack API. * usages ** instance_usage ** memory_usage ** root_volume_usage ** data_volume_usage ** usages_per_service_offering ** usages_per_disk_offering * event ** event_log ** event_flow(per interval) h2. Installation Add this line to your application's Gemfile:
gem 'fluent-plugin-cloudstack'
Or install it yourself as:
$ gem install fluent-plugin-cloudstack
Or use td-agent : (on Ubuntu12.04)
$ sudo /usr/lib/fluent/ruby/bin/fluent-gem install fluent-plugin-cloudstack
h2. Configuration

  type cloudstack
  host $cloudtack_host
  apikey $cloudstack_apikey
  secretkey $cloustack_secretkey

  # optional
  protocol $cloudstack_protocol_scheme # https or http, default https
  path $cloudstack_path                # default /client/api
  port $cloudstack_port                # default 443
  interval $get_interval_sec           # min 300, default 300
  ssl $cloudtack_api_ssl               # true or false, default true
  domain_id $cloudstack_domain_id

  tag $fluentd_tag                     # default cloudstack

h2. Data Example
20130507T041336+0000    cloudstack.event        {"id":"xxxxxxx-4e64-4fa5-8045-5ecffb7e2417",
                                                 "username":"clnxxxxxxxxx",
                                                 "type":"USER.LOGIN",
                                                 "level":"INFO",
                                                 "description":"user has logged in from IP Address xxx.xxx.xxx.xxx",
                                                 "account":"clnxxxxxxx",
                                                 "domainid":"xxxxxxxx-dcc3-486b-90e8-02c514c93d1f",
                                                 "domain":"cln10000004",
                                                 "created":"2013-05-07T13:13:36+0900",
                                                 "state":"Completed",
                                                 "parentid":"0"}

20131028T133511+0000    cloudstack.usages       {"vm_sum":1,
                                                 "memory_sum":512,
                                                 "cpu_sum":1,
                                                 "root_volume_sum":16106127360,
                                                 "data_volume_sum":42949672960,
                                                 "t1.micro":1,
                                                 "Datadisk_40GB":1}
20131028T133511+0000    cloudstack.usages       {"event_flow":5}