lib/pghero/methods/system.rb in pghero-2.7.2 vs lib/pghero/methods/system.rb in pghero-2.7.3
- old
+ new
@@ -142,10 +142,10 @@
end_time = Time.at(((Time.now - offset).to_f / period).ceil * period)
start_time = end_time - duration
# validate input since we need to interpolate below
raise Error, "Invalid metric name" unless metric_name =~ /\A[a-z\/_]+\z/i
- raise Error, "Invalid database id" unless gcp_database_id =~ /\A[a-z\-:]+\z/i
+ raise Error, "Invalid database id" unless gcp_database_id =~ /\A[a-z0-9\-:]+\z/i
# we handle three situations:
# 1. google-cloud-monitoring-v3
# 2. google-cloud-monitoring >= 1
# 3. google-cloud-monitoring < 1