chore: sync local updates
This commit is contained in:
17
mengyamonitor-backend-client/main.go
Normal file
17
mengyamonitor-backend-client/main.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
addr := os.Getenv("CENTRAL_GRPC")
|
||||
serverID := os.Getenv("SERVER_ID")
|
||||
key := os.Getenv("AGENT_KEY")
|
||||
if addr == "" || serverID == "" || key == "" {
|
||||
log.Fatal("mengyamonitor agent requires CENTRAL_GRPC, SERVER_ID, and AGENT_KEY")
|
||||
}
|
||||
log.Printf("agent reporting via gRPC to %s (server_id=%s)", addr, serverID)
|
||||
runGRPCLoop(addr, serverID, key)
|
||||
}
|
||||
Reference in New Issue
Block a user