Refactor: Integrate regional agents in service-operation

Integrate distributed monitoring agents for HTTP, PING, TCP, and DNS checks
This commit is contained in:
Tola Leng
2025-06-21 17:48:55 +07:00
parent ea95490f13
commit 57a65106cb
16 changed files with 422 additions and 40 deletions
@@ -57,8 +57,10 @@ func (ms *MetricsSaver) SaveUptimeDataToPocketBase(result *types.OperationResult
Keyword: "", // Can be populated later if needed
ErrorMessage: result.Error,
Details: details, // Short, clean message
Region: "default", // You can make this configurable
RegionID: "1", // You can make this configurable
Region: ms.regionName, // Legacy field
RegionID: ms.agentID, // Legacy field
RegionName: ms.regionName, // Add regional fields
AgentID: ms.agentID,
}
if err := ms.pbClient.SaveUptimeData(uptimeData); err != nil {