Skip to content

Add heartbeat stats for disk usage by uploaded files

Michael Prilop requested to merge add-heartbeat-stats-for-storage-occupation into main

Adds daily statistics of disk space used by files.

For more details see !1541 (merged)

Note: If we wanted to add database size monitoring at some point we could use this snippet

  def database_size
    database_name = ActiveRecord::Base.connection.instance_variable_get(:@config)[:database]
    sql = "SELECT pg_database_size('#{database_name}')"
    @dbs ||= ActiveRecord::Base.connection.execute(sql).first["pg_database_size"]
  end
Edited by Michael Prilop

Merge request reports