2020-09-29 01:28:43 +02:00
# Monitor
2020-09-29 02:38:24 +02:00
Monitor middleware for [Fiber ](https://github.com/gofiber/fiber ) that reports server metrics, inspired by [express-status-monitor ](https://github.com/RafalWilinski/express-status-monitor )
2020-09-29 01:28:43 +02:00

### Signatures
```go
func New() fiber.Handler
```
### Examples
2020-09-29 02:36:15 +02:00
Import the middleware package and assign it to a route.
2020-09-29 01:28:43 +02:00
```go
2020-09-29 02:35:41 +02:00
package main
2020-09-29 01:28:43 +02:00
import (
2020-09-29 02:35:41 +02:00
"log"
2020-09-29 01:28:43 +02:00
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/monitor"
)
2020-09-29 02:35:41 +02:00
func main() {
app := fiber.New()
2020-09-29 02:36:15 +02:00
2020-09-29 02:35:41 +02:00
app.Get("/dashboard", monitor.New())
2020-09-29 02:36:15 +02:00
2020-09-29 02:35:41 +02:00
log.Fatal(app.Listen(":3000"))
}
```