Go: update server config (#17027)

### Summary

```
RAGFlow(admin)> list services;
+--------+--------------+----+---------------------+------+---------------+-----------+
| enable | host         | id | name                | port | service_type  | status    |
+--------+--------------+----+---------------------+------+---------------+-----------+
|        | localhost    | 0  | redis               | 6379 | cache         | alive     |
|        | localhost    | 1  | minio               | 9000 | file_store    | alive     |
|        | localhost    | 2  | elasticsearch       | 1200 | retrieval     | alive     |
|        | localhost    | 3  | mysql               | 3306 | meta_data     | alive     |
| false  | localhost    | 4  | jaeger              | 4318 | tracing       | unknown   |
|        | localhost    | 5  | clickhouse          | 9900 | olap          | unknown   |
|        | localhost    | 6  | nats                | 4222 | message_queue | CONNECTED |
|        | 192.168.1.68 | 7  | ragflow-server-9384 | 9384 | api_server    | alive     |
+--------+--------------+----+---------------------+------+---------------+-----------+

```

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-07-17 13:54:19 +08:00
committed by GitHub
parent 27d091b5b6
commit cf71c7193a
4 changed files with 22 additions and 22 deletions

View File

@@ -1022,21 +1022,12 @@ func (s *Service) GetServiceDetails(configDict map[string]interface{}) (map[stri
switch serviceType {
case "meta_data":
return s.getMySQLStatus(name)
case "cache":
return s.getRedisInfo(name)
case "message_queue":
switch name {
case "redis":
return s.getRedisInfo(name)
case "nats":
host := configDict["host"].(string)
port := configDict["port"].(int)
return s.checkNatsAlive(name, host, port)
default:
return map[string]interface{}{
"service_name": name,
"status": "unknown",
"message": "Service type not supported",
}, nil
}
host := configDict["host"].(string)
port := configDict["port"].(int)
return s.checkNatsAlive(name, host, port)
case "retrieval":
// Check the extra.retrieval_type to determine which retrieval service
if extra, ok := configDict["extra"].(map[string]interface{}); ok {
@@ -1396,7 +1387,7 @@ func (s *Service) checkOlapAlive(name string) (map[string]interface{}, error) {
if clickhouseDriver == nil {
return map[string]interface{}{
"service_name": name,
"status": "ClickHouse engine not initialized",
"status": "unknown",
}, nil
}