ubicloud/model/postgres/postgres_metric_destination.rb
Burak Yucesoy 25def5ea8e Add Postgres metric destinations
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.
2024-07-03 01:52:02 +02:00

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