Compare commits

..

No commits in common. "62f935c2f3dd8bdce89d4259a3d5ffbb4097fbd9" and "50e708619265a07b1aa3ee08cbd552e825806192" have entirely different histories.

3 changed files with 4 additions and 5 deletions

1
.gitignore vendored
View File

@ -43,4 +43,3 @@ test/
# 编译文件
sysmonitord
fixroad.md

View File

@ -19,7 +19,7 @@ import (
const (
OfficialConfigURL = "http://localhost:8080/api/configs/official.json"
UserConfigURL = "http://localhost:8080/api/configs/user.json"
CenterServerURL = "ws://localhost:8090/api/v1/ws"
CenterServerURL = "ws://localhost:8080/ws/monitor"
)
func main() {
@ -102,7 +102,7 @@ func main() {
go func() {
for alert := range sshAlertChan {
packet := network.NewPacket("SSH_ALERT", alert)
packet := network.NewPactet("SSH_ALERT", alert)
auditClient.SendQueue(packet)
}
}()
@ -119,7 +119,7 @@ func main() {
go func() {
for metrics := range metricsChan {
packet := network.NewPacket("STATUS_UPDATE", metrics)
packet := network.NewPactet("STATUS_UPDATE", metrics)
centerClient.SendQueue(packet)
}
}()

View File

@ -8,7 +8,7 @@ type Packet struct {
Payload interface{} `json:"payload"`
}
func NewPacket(msgType string, payload interface{}) Packet {
func NewPactet(msgType string, payload interface{}) Packet {
return Packet{
Type: msgType,
Timestamp: time.Now().Unix(),