Skip to content

Commit a1d5f19

Browse files
authored
Merge pull request #1681 from utmstack/release/v11.2.2
Release/v11.2.2
2 parents 01fd51d + 08af311 commit a1d5f19

File tree

148 files changed

+5352
-2463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+5352
-2463
lines changed

.github/workflows/installer-release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,12 @@ jobs:
180180
-X 'github.com/utmstack/UTMStack/installer/config.INSTALLER_VERSION=${{ inputs.version }}' \
181181
-X 'github.com/utmstack/UTMStack/installer/config.REPLACE=${{ secrets.CM_ENCRYPT_SALT }}' \
182182
-X 'github.com/utmstack/UTMStack/installer/config.PUBLIC_KEY=${{ secrets.CM_SIGN_PUBLIC_KEY }}'" .
183-
mv installer /home/utmstack/installer
184-
chmod +x /home/utmstack/installer
183+
mv installer /usr/local/bin/utmstack_installer
184+
chmod +x /usr/local/bin/utmstack_installer
185185
186186
- name: Run Installer
187-
working-directory: /home/utmstack
188187
run: |
189-
sudo ./installer
188+
sudo /usr/local/bin/utmstack_installer
190189
191190
# ============================================
192191
# V11 RC - Upload to prerelease only

agent-manager/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ RUN GRPCURL_VERSION=1.8.1 && \
2020

2121

2222
# Expose the gRPC agent-manager port
23-
EXPOSE 50051
24-
EXPOSE 8080
23+
EXPOSE 9000
24+
EXPOSE 9001
2525

2626
# Set the health check
2727
# HEALTHCHECK --interval=60s --timeout=5s --start-period=5s --retries=3 CMD grpcurl -insecure -plaintext -d '{"service": ""}' localhost:50051 grpc.health.v1.Health/Check | jq -e '.status == "SERVING"' || exit 1

agent-manager/agent/collector_imp.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ func InitCollectorService() {
6363
collectors := []models.Collector{}
6464
_, err := CollectorServ.DBConnection.GetAll(&collectors, "")
6565
if err != nil {
66-
catcher.Error("failed to fetch collectors", err, map[string]any{"process": "agent-manager"})
66+
_ = catcher.Error("failed to fetch collectors", err, map[string]any{"process": "agent-manager"})
67+
time.Sleep(5 * time.Second)
6768
os.Exit(1)
6869
}
6970
for _, c := range collectors {

agent-manager/agent/utmgrpc.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"crypto/tls"
55
"net"
66
"os"
7+
"time"
78

89
"github.com/threatwinds/go-sdk/catcher"
910
"github.com/utmstack/UTMStack/agent-manager/config"
@@ -16,7 +17,8 @@ import (
1617
func InitGrpcServer() {
1718
err := InitAgentService()
1819
if err != nil {
19-
catcher.Error("failed to init agent service", err, map[string]any{"process": "agent-manager"})
20+
_ = catcher.Error("failed to init agent service", err, map[string]any{"process": "agent-manager"})
21+
time.Sleep(5 * time.Second)
2022
os.Exit(1)
2123
}
2224

@@ -27,15 +29,17 @@ func InitGrpcServer() {
2729
}
2830

2931
func StartGrpcServer() {
30-
listener, err := net.Listen("tcp", "0.0.0.0:50051")
32+
listener, err := net.Listen("tcp", "0.0.0.0:9000")
3133
if err != nil {
32-
catcher.Error("failed to listen", err, map[string]any{"process": "agent-manager"})
34+
_ = catcher.Error("failed to listen", err, map[string]any{"process": "agent-manager"})
35+
time.Sleep(5 * time.Second)
3336
os.Exit(1)
3437
}
3538

3639
loadedCert, err := tls.LoadX509KeyPair(config.CertPath, config.CertKeyPath)
3740
if err != nil {
38-
catcher.Error("failed to load TLS credentials: %v", err, map[string]any{"process": "agent-manager"})
41+
_ = catcher.Error("failed to load TLS credentials: %v", err, map[string]any{"process": "agent-manager"})
42+
time.Sleep(5 * time.Second)
3943
os.Exit(1)
4044
}
4145

@@ -59,9 +63,10 @@ func StartGrpcServer() {
5963
grpc_health_v1.RegisterHealthServer(grpcServer, healthServer)
6064
healthServer.SetServingStatus("", grpc_health_v1.HealthCheckResponse_SERVING)
6165

62-
catcher.Info("Starting gRPC server on 0.0.0.0:50051", map[string]any{"process": "agent-manager"})
66+
catcher.Info("Starting gRPC server on 0.0.0.0:9000", map[string]any{"process": "agent-manager"})
6367
if err := grpcServer.Serve(listener); err != nil {
64-
catcher.Error("failed to serve", err, map[string]any{"process": "agent-manager"})
68+
_ = catcher.Error("failed to serve", err, map[string]any{"process": "agent-manager"})
69+
time.Sleep(5 * time.Second)
6570
os.Exit(1)
6671
}
6772
}

agent-manager/go.mod

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ go 1.25.5
44

55
require (
66
github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0
7-
github.com/gin-contrib/gzip v1.2.5
87
github.com/gin-gonic/gin v1.11.0
98
github.com/google/uuid v1.6.0
109
github.com/utmstack/config-client-go v1.2.7
@@ -16,21 +15,16 @@ require (
1615

1716
require (
1817
github.com/bytedance/gopkg v0.1.3 // indirect
19-
github.com/goccy/go-yaml v1.19.2 // indirect
20-
github.com/quic-go/qpack v0.6.0 // indirect
21-
github.com/quic-go/quic-go v0.59.0 // indirect
22-
)
23-
24-
require (
25-
github.com/bytedance/sonic v1.14.2 // indirect
26-
github.com/bytedance/sonic/loader v0.4.0 // indirect
18+
github.com/bytedance/sonic v1.15.0 // indirect
19+
github.com/bytedance/sonic/loader v0.5.0 // indirect
2720
github.com/cloudwego/base64x v0.1.6 // indirect
2821
github.com/gabriel-vasile/mimetype v1.4.12 // indirect
2922
github.com/gin-contrib/sse v1.1.0 // indirect
3023
github.com/go-playground/locales v0.14.1 // indirect
3124
github.com/go-playground/universal-translator v0.18.1 // indirect
3225
github.com/go-playground/validator/v10 v10.30.1 // indirect
3326
github.com/goccy/go-json v0.10.5 // indirect
27+
github.com/goccy/go-yaml v1.19.2 // indirect
3428
github.com/jackc/pgpassfile v1.0.0 // indirect
3529
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
3630
github.com/jackc/pgx/v5 v5.8.0 // indirect
@@ -44,7 +38,9 @@ require (
4438
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4539
github.com/modern-go/reflect2 v1.0.2 // indirect
4640
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
47-
github.com/threatwinds/go-sdk v1.1.7
41+
github.com/quic-go/qpack v0.6.0 // indirect
42+
github.com/quic-go/quic-go v0.59.0 // indirect
43+
github.com/threatwinds/go-sdk v1.1.8
4844
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
4945
github.com/ugorji/go/codec v1.3.1 // indirect
5046
golang.org/x/arch v0.23.0 // indirect
@@ -53,5 +49,5 @@ require (
5349
golang.org/x/sync v0.19.0 // indirect
5450
golang.org/x/sys v0.40.0 // indirect
5551
golang.org/x/text v0.33.0 // indirect
56-
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 // indirect
52+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260122232226-8e98ce8d340d // indirect
5753
)

agent-manager/go.sum

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0 h1:TBiBl9KCa4i4epY0/q9WSC4ugavL
22
github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0/go.mod h1:cRhQ3TS/VEfu/z+qaciyuDZdtxgaXgaX8+G6Wa5NzBk=
33
github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M=
44
github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM=
5-
github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE=
6-
github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980=
7-
github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o=
8-
github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo=
5+
github.com/bytedance/sonic v1.15.0 h1:/PXeWFaR5ElNcVE84U0dOHjiMHQOwNIx3K4ymzh/uSE=
6+
github.com/bytedance/sonic v1.15.0/go.mod h1:tFkWrPz0/CUCLEF4ri4UkHekCIcdnkqXw9VduqpJh0k=
7+
github.com/bytedance/sonic/loader v0.5.0 h1:gXH3KVnatgY7loH5/TkeVyXPfESoqSBSBEiDd5VjlgE=
8+
github.com/bytedance/sonic/loader v0.5.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo=
99
github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M=
1010
github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU=
1111
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -14,8 +14,6 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
1414
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1515
github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw=
1616
github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
17-
github.com/gin-contrib/gzip v1.2.5 h1:fIZs0S+l17pIu1P5XRJOo/YNqfIuPCrZZ3TWB7pjckI=
18-
github.com/gin-contrib/gzip v1.2.5/go.mod h1:aomRgR7ftdZV3uWY0gW/m8rChfxau0n8YVvwlOHONzw=
1917
github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w=
2018
github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM=
2119
github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk=
@@ -89,8 +87,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
8987
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
9088
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
9189
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
92-
github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo=
93-
github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
90+
github.com/threatwinds/go-sdk v1.1.8 h1:jDd6HH4GZVRswv9ToaVU+xcyzNlKnA7f1lf/e1Xyt3A=
91+
github.com/threatwinds/go-sdk v1.1.8/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
9492
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
9593
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
9694
github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY=
@@ -126,8 +124,8 @@ golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
126124
golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
127125
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
128126
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
129-
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 h1:sNrWoksmOyF5bvJUcnmbeAmQi8baNhqg5IWaI3llQqU=
130-
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
127+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260122232226-8e98ce8d340d h1:xXzuihhT3gL/ntduUZwHECzAn57E8dA6l8SOtYWdD8Q=
128+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260122232226-8e98ce8d340d/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
131129
google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc=
132130
google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U=
133131
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=

agent-manager/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"os"
5+
"time"
56

67
"github.com/threatwinds/go-sdk/catcher"
78
"github.com/utmstack/UTMStack/agent-manager/agent"
@@ -15,6 +16,7 @@ func main() {
1516
err := database.MigrateDatabase()
1617
if err != nil {
1718
_ = catcher.Error("failed to migrate database", err, map[string]any{"process": "agent-manager"})
19+
time.Sleep(5 * time.Second)
1820
os.Exit(1)
1921
}
2022

agent-manager/updates/updates.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ func ServeDependencies() {
6060
}
6161

6262
server := &http.Server{
63-
Addr: ":8080",
63+
Addr: ":9001",
6464
Handler: r,
6565
TLSConfig: tlsConfig,
6666
}
6767

68-
catcher.Info("Starting HTTP server on port 8080", map[string]any{"process": "agent-manager"})
68+
catcher.Info("Starting HTTP server on port 9001", map[string]any{"process": "agent-manager"})
6969
if err := server.ListenAndServeTLS("", ""); err != nil {
7070
_ = catcher.Error("error starting HTTP server", err, map[string]any{"process": "agent-manager"})
7171
return

agent/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ require (
88
github.com/glebarez/sqlite v1.11.0
99
github.com/google/uuid v1.6.0
1010
github.com/kardianos/service v1.2.4
11+
github.com/netsampler/goflow2 v1.3.7
1112
github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068
1213
github.com/threatwinds/go-sdk v1.1.7
1314
github.com/threatwinds/logger v1.2.3

agent/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
8787
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
8888
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
8989
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
90+
github.com/netsampler/goflow2 v1.3.7 h1:XZaTy8kkMnGXpJ9hS3KbO1McyrFTpVNhVFEx9rNhMmc=
91+
github.com/netsampler/goflow2 v1.3.7/go.mod h1:4UZsVGVAs//iMCptUHn3WNScztJeUhZH7kDW2+/vDdQ=
9092
github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc=
9193
github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ=
9294
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=

0 commit comments

Comments
 (0)