sipcapture / heplify-server

HEP Capture Server for HOMER
https://sipcapture.org
GNU Affero General Public License v3.0
183 stars 85 forks source link

Management of homer DB size #554

Open matuskaacc opened 2 months ago

matuskaacc commented 2 months ago

I have a total of 100GB to be used in the homer postgres database. I would like to configure it so that when it reaches 80% of this 100GB value (80GB), older SIP call recordings are deleted, maintaining a maximum of 80GB of occupancy in the database. I tried to configure this parameter DBPercentageUsage and DBMaxSize as below in heplify-server.toml file but without having any effect.

DBRotate = false DBPartLog = "2h" DBPartSip = "1h" DBPartQos = "6h" DBDropDays = 0 DBDropDaysCall = 0 DBDropDaysRegister = 0 DBDropDaysDefault = 0 DBDropOnStart = false DBUsageProtection = true DBUsageScheme = "percentage" DBPercentageUsage = "80%" DBMaxSize = "100GB"** Dedup = false DiscardMethod = ["REGISTER","NOTIFY","MESSAGE","OPTIONS"] AlegIDs = [] CustomHeader = [] SIPHeader = [] LogDbg = "" LogLvl = "info" LogStd = false LogSys = false Config = "./heplify-server.toml" ConfigHTTPAddr = ""

Examples:

lmangani commented 1 month ago

Please paste some logs from a restart so we can check which actions are being taken by the core.

matuskaacc commented 4 days ago

I created a script to manages the db size, thanks for de response.