Add more metrics
This commit is contained in:
@@ -82,7 +82,17 @@ func ActionServe(c *cli.Context) error {
|
||||
return fmt.Errorf("Invalid store configured")
|
||||
}
|
||||
|
||||
s = store.NewMetricsCollectingStore(s)
|
||||
// Setup interrupt handling
|
||||
interruptChan := make(chan os.Signal, 1)
|
||||
signal.Notify(interruptChan, os.Interrupt)
|
||||
|
||||
rootCtx, rootCancel := context.WithCancel(c.Context)
|
||||
defer rootCancel()
|
||||
serversCtx, serversCancel := context.WithCancel(rootCtx)
|
||||
defer serversCancel()
|
||||
|
||||
// Setup metrics collection
|
||||
s = store.NewMetricsCollectingStore(rootCtx, s)
|
||||
|
||||
// Setup honeypot
|
||||
hs, err := ssh.NewHoneypotServer(cfg.Honeypot, s)
|
||||
@@ -109,13 +119,6 @@ func ActionServe(c *cli.Context) error {
|
||||
web.TLSConfig = tlsConfig
|
||||
}
|
||||
|
||||
// Setup interrupt handling
|
||||
interruptChan := make(chan os.Signal, 1)
|
||||
signal.Notify(interruptChan, os.Interrupt)
|
||||
|
||||
rootCtx, rootCancel := context.WithCancel(c.Context)
|
||||
serversCtx, serversCancel := context.WithCancel(rootCtx)
|
||||
|
||||
// Setup portlistener, if configured
|
||||
if cfg.Ports.Enable {
|
||||
portsCtx, cancel := context.WithCancel(rootCtx)
|
||||
|
Reference in New Issue
Block a user