We are adding a new model; PostgresMetricDestination to keep track of each Postgres resource's associated metric destinations. We then compile then and write to prometheus.yml file so that Prometheus can write scraped metrics to the destinations.
17 lines
319 B
Ruby
17 lines
319 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../../model"
|
|
|
|
class PostgresMetricDestination < Sequel::Model
|
|
many_to_one :postgres_resource, key: :postgres_resource_id
|
|
|
|
include ResourceMethods
|
|
|
|
plugin :column_encryption do |enc|
|
|
enc.column :password
|
|
end
|
|
|
|
def self.ubid_type
|
|
UBID::TYPE_ETC
|
|
end
|
|
end
|