diff --git a/alerts.go b/alerts.go index fe2aa046..4a3f4e3a 100644 --- a/alerts.go +++ b/alerts.go @@ -263,7 +263,7 @@ func doAlertsRetrieve(c *cli.Context) error { } } - PrettyPrintJSON(alerts.Alerts) + PrettyPrintJSON(alerts.Alerts[:limit]) } else { alerts, err := client.FindAlerts() logger.DieIf(err) @@ -280,7 +280,7 @@ func doAlertsRetrieve(c *cli.Context) error { } } - PrettyPrintJSON(alerts.Alerts) + PrettyPrintJSON(alerts.Alerts[:limit]) } return nil } @@ -312,7 +312,7 @@ func doAlertsList(c *cli.Context) error { } } } - alert = alerts.Alerts + alert = alerts.Alerts[:limit] } else { alerts, err := client.FindAlerts() logger.DieIf(err) @@ -328,7 +328,7 @@ func doAlertsList(c *cli.Context) error { time.Sleep(1 * time.Second) } } - alert = alerts.Alerts + alert = alerts.Alerts[:limit] } joinedAlerts := joinMonitorsAndHosts(client, alert) for _, joinAlert := range joinedAlerts {