No commit activity in last 3 years
No release in over 3 years
Stackdriver Monitoring custom metrics output plugin for Fluentd
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

< 2, >= 0.12.0
 Project Readme

fluent-plugin-stackdriver-monitoring

Stackdriver Monitoring custom metrics output plugin for Fluentd

Installation

$ gem install fluent-plugin-stackdriver-monitoring

Authentication

See google-cloud-monitoring gem document.

Configuration

Sample configuration is below.

<match your.tag>
  @type stackdriver_monitoring
  project {{PROJECT_NAME}}

  <custom_metrics>
    key {{KEY_NAME}}
    type custom.googleapis.com/{{METRICS_NAME}}
    metric_kind GAUGE
    value_type INT64
  </custom_metrics>

  flush_interval 1s  # must be 1(sec) or above
</match>
  • project (string, required)
    • Set your Stackdriver project id.
  • custom_metrics
    • key (string, required)
      • Specify field name in your log to send to Stackdriver.
    • type (string, required)
      • Set name of descriptor. It must start with custom.googleapis.com/.
    • metric_kind(enum, required)
      • See metric kind.
      • You can specify GAUGE or CUMULATIVE.
      • Custom metric does not support DELTA. See here.
    • value_type(enum, required)
      • See value type.
      • You can specify BOOL, INT64 or DOUBLE if metric_kind is GAUGE. And INT64 or DOUBLE can be specified if metric_kind is CUMULATIVE.
      • Custom metric does not support MONEY and STRING. See here.
    • time_interval(time, optional)
      • This param is used as the difference between start time and end time.
      • It must be greater than 0s if metric_kind is set to CUMULATIVE.

TODO

  • Add test!
  • Support Unit and Monitored Resource in custom_metrics.