advantageous / systemd-cloud-watch

Alt util to AWS cloudwatch agent that works w/ systemd journal and sends the data in batches to AWS cloudwatch.
https://advantageous.github.io/systemd-cloud-watch/
91 stars 37 forks source link

Fills /var/log/messages with Spew #14

Open jamiethermo opened 7 years ago

jamiethermo commented 7 years ago

main INFO: 2017/02/08 01:20:58 workers.go:86: Systemd CloudWatch: batches sent 5146, idleCount 61454607, emptyCount 61459673

61,454,607 lines of spew and counting. Also, that suggests this thing is polling far to fast.

                now := time.Now().Unix()
                if now-r.lastMetricTime > 120 {
                    now = r.lastMetricTime
                    r.logger.Infof("Systemd CloudWatch: batches sent %d, idleCount %d,  emptyCount %d",
                        r.batchCounter, r.idleCounter, r.emptyCounter)
                }

Surely you want r.lastMetricTime = now on that third line.

fiunchinho commented 7 years ago

Same problem here. Any change to get this fixed?

ryanwitt commented 7 years ago

fixed in https://github.com/advantageous/systemd-cloud-watch/pull/16