class ForemanGraphite::Client

Attributes

client[R]

Public Class Methods

new(opts = {}) click to toggle source
# File lib/foreman_graphite/client.rb, line 4
def initialize(opts = {})
  GraphiteAPI::Logger.logger = opts[:logger] if opts[:logger]

  @client = GraphiteAPI.new(
    :graphite => (opts[:server] || "0.0.0.0:2003"), # required argument
    :prefix   => ['theforeman', fqdn]
  )
end

Public Instance Methods

fqdn() click to toggle source
# File lib/foreman_graphite/client.rb, line 13
def fqdn
  @fqdn ||= (Facter.value(:fqdn) || SETTINGS[:fqdn]).tr(".", "-")
end