|
53 | 53 | emitProgLabel = flag.Bool("emit_prog_label", true, "Emit the 'prog' label in variable exports.") |
54 | 54 |
|
55 | 55 | // Ops flags |
56 | | - pollInterval = flag.Duration("poll_interval", 0, "Set the interval to poll all log files for data; must be positive, or zero to disable polling. With polling mode, only the files found at mtail startup will be polled.") |
57 | | - disableFsnotify = flag.Bool("disable_fsnotify", false, "When enabled no fsnotify watcher is created, and mtail falls back to polling mode only. Only the files known at program startup will be polled.") |
| 56 | + pollInterval = flag.Duration("poll_interval", 0, "Set the interval to poll all log files for data; must be positive, or zero to disable polling. With polling mode, only the files found at mtail startup will be polled.") |
| 57 | + disableFsnotify = flag.Bool("disable_fsnotify", false, "When enabled no fsnotify watcher is created, and mtail falls back to polling mode only. Only the files known at program startup will be polled.") |
| 58 | + storeExpireTickInterval = flag.Duration("store_expire_tick_interval", time.Hour, "interval to delete expired metrics from store") |
58 | 59 |
|
59 | 60 | // Debugging flags |
60 | 61 | blockProfileRate = flag.Int("block_profile_rate", 0, "Nanoseconds of block time before goroutine blocking events reported. 0 turns off. See https://golang.org/pkg/runtime/#SetBlockProfileRate") |
@@ -121,6 +122,7 @@ func main() { |
121 | 122 | mtail.BindAddress(*address, *port), |
122 | 123 | mtail.BuildInfo(buildInfo()), |
123 | 124 | mtail.OverrideLocation(loc), |
| 125 | + mtail.StoreExpireTickInterval(*storeExpireTickInterval), |
124 | 126 | } |
125 | 127 | if *oneShot { |
126 | 128 | opts = append(opts, mtail.OneShot) |
|
0 commit comments