Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions jobs/locket/spec
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ properties:
default: false
diego.locket.sql.ca_cert:
description: "Bundle of CA certificates for the Locket to verify the SQL server SSL certificate when connecting via SSL"
diego.locket.health_check_timeout:
description: "Number of seconds to wait for the DB health check insert/retrieve operation to time out"
default: 5
diego.locket.health_check_interval:
description: "Number of seconds to wait between DB health checks"
default: 10
diego.locket.health_check_failure_threshold:
description: "Number of consecutive failed DB health checks before restarting Locket"
default: 3
diego.locket.enable_db_health_check:
description: "Whether or not to enable DB health checks in Locket to ensure it restarts in a timely fashion upon severe DB degradation"
default: false

loggregator.v2_api_port:
description: "Local metron agent gRPC port"
Expand Down
10 changes: 10 additions & 0 deletions jobs/locket/templates/locket.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ config = {
log_level: p("diego.locket.log_level"),
max_open_database_connections: p("database.max_open_connections"),
max_database_connection_lifetime: "1h",
health_check_failure_threshold: p("diego.locket.health_check_failure_threshold"),
enable_db_health_check: p("diego.locket.enable_db_health_check"),
}

def db_params
Expand Down Expand Up @@ -78,6 +80,14 @@ end
config[:db_write_timeout] = "#{value}s" # add time unit
end

if_p("diego.locket.health_check_timeout") do |value|
config[:health_check_timeout] = "#{value}s" # add time unit
end

if_p("diego.locket.health_check_interval") do |value|
config[:health_check_interval] = "#{value}s" # add time unit
end

config[:time_format] = "rfc3339"
config[:loggregator]={}
config[:loggregator][:loggregator_api_port] = p("loggregator.v2_api_port")
Expand Down