lib/fluent/plugin/in_prometheus_monitor.rb in fluent-plugin-prometheus-0.1.2 vs lib/fluent/plugin/in_prometheus_monitor.rb in fluent-plugin-prometheus-0.1.3

- old
+ new

@@ -1,5 +1,7 @@ +require 'fluent/input' +require 'fluent/plugin/in_monitor_agent' require 'fluent/plugin/prometheus' require 'webrick' module Fluent class PrometheusMonitorInput < Input @@ -14,24 +16,24 @@ end def configure(conf) super hostname = Socket.gethostname - expander = Fluent::Prometheus.placeholder_expnader(log) + expander = Fluent::Prometheus.placeholder_expander(log) placeholders = expander.prepare_placeholders({'hostname' => hostname}) @base_labels = Fluent::Prometheus.parse_labels_elements(conf) @base_labels.each do |key, value| @base_labels[key] = expander.expand(value, placeholders) end - @monitor_agent = MonitorAgentInput.new + @monitor_agent = Fluent::MonitorAgentInput.new buffer_queue_length = @registry.gauge( :fluentd_status_buffer_queue_length, 'Current buffer queue length.') buffer_total_queued_size = @registry.gauge( :fluentd_status_buffer_total_bytes, - 'Current total size of ququed buffers.') + 'Current total size of queued buffers.') retry_counts = @registry.gauge( :fluentd_status_retry_count, 'Current retry counts.') @monitor_info = {