https://github.com/monai/gomonit
gomonit consumes and parses Monit status and event notifications
https://github.com/monai/gomonit
Last synced: 12 months ago
JSON representation
gomonit consumes and parses Monit status and event notifications
- Host: GitHub
- URL: https://github.com/monai/gomonit
- Owner: monai
- Created: 2015-03-06T16:43:04.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-04-29T15:20:10.000Z (about 10 years ago)
- Last Synced: 2025-05-25T08:38:57.535Z (about 1 year ago)
- Language: Go
- Homepage: http://godoc.org/github.com/monai/gomonit
- Size: 19.5 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gomonit
Package gomonit consumes and parses Monit status and event notifications. It disguises as M/Monit collector server.
## Example
```go
// create channel and pass it to the collector
channel := make(chan *gomonit.Monit)
collector := gomonit.NewCollector(channel)
http.Handle("/collector", collector)
go func() {
err := http.ListenAndServe(":8080", nil)
if err != nil {
log.Fatal("http.ListenAndServe: ", err)
}
}()
// consume notifications
for monit := range channel {
fmt.Println(monit.Server.Uptime)
}
```
# License
ISC