Skip to content

Commit

Permalink
v0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdeface committed Sep 19, 2021
1 parent a252d9b commit 11caa90
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To send data you should make http Get request with these query parameters: ["ser
```bash
curl localhost:8080?server=HOST_NAME&key=ITEM&value=MYVAL
```
##### Пример запуска docker контейнера
##### (example run on docker) Пример запуска docker контейнера
```bash
docker run --name zabbix-sender-http -d \
-p 3001:8080 \
Expand Down
Binary file modified dist/zabbix-http
Binary file not shown.
Binary file modified dist/zabbix-http.exe
Binary file not shown.
2 changes: 2 additions & 0 deletions internal/zabbix/zabbix.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ func NewPacketWithMessage(host, key, value string, clock ...int64) *Packet {
}

func (zp *Packet) AddMessage(host, key, value string) {
zp.mu.Lock()
zp.Data = append(zp.Data, Message{
Host: host,
Key: key,
Value: value,
})
zp.mu.Unlock()
}
func (zp *Packet) Prepare() []byte {
serialized, _ := json.Marshal(zp)
Expand Down

0 comments on commit 11caa90

Please sign in to comment.