Skip to content

Commit a3dbe7f

Browse files
authored
don't flush 127.0.0.1 (#4315)
* don't flush local machines
1 parent 013cdea commit a3dbe7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/database/flush.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ func (c *Client) flushAgents(ctx context.Context, authType string, duration *tim
198198
machine.LastHeartbeatLTE(time.Now().UTC().Add(-*duration)),
199199
machine.Not(machine.HasAlerts()),
200200
machine.AuthTypeEQ(authType),
201+
machine.IpAddressNotIn("127.0.0.1", "::1"),
201202
).Exec(ctx)
202203
if err != nil {
203204
c.Log.Errorf("while auto-deleting expired machines (%s): %s", authType, err)

0 commit comments

Comments
 (0)