Open aensidhe opened 9 years ago
Also bumped into that problem (with nagios passive checks).
It is still possible to work without those events (with check_freshness=1 , freshness_threashold=1.2*flush_interval, check_command=check_dummy!0!NoEventGot) but that doesn't sound like wise idea as monitoring strategy. I would be a lot more comfortable with periodic 'heartbeat' events emitted from logstash using that plugin.
@ph would it be possible to remove/guard by parameter that part in should_flush function ?
&& (!@metric_meters.empty? || !@metric_timers.empty?)'
I really don't know what will be the consequences of that, and I still do not have development environment ready for developing plugins.
+1 on this - I'm doing something similar to what aensidhe is doing in zabbix, and things work much better if I an just count on getting a number regularly.
Just a note for those still hanging on this one. You can sort of work around this by using the "heartbeat" input. I don't think you can actually get "zero" with it, but if you can live with a bit of noise it does give you regular values.
I looked into what it would take to make the metrics filter emit zeros (the ideal). It is actually not easy given the way it's implemented. The filter doesn't really have any idea what to emit 'til an event is received. I gave up on actually doing this and settled for some floating point noise.
We are using metrics to count exception over time and we are sending that count to Zabbix. Zabbix traps are not autoresettable, so they will remember last emitted value to them.
I think it is convinient to emit "zero" event after cleaning interval elapsed, if there are no meaningful event to emit.