sensu-influxdb-extension
sensu-influxdb-extension copied to clipboard
* adding yield at end of run block, to allow sensu-server shutdown
Without adding this yield, I could never shutdown sensu-server using /etc/init.d/sensu-server restart
In the logs, you'd see this, where handlers_in_progress_count would be a higher value, depending on how many influxdb handler calls were made.
This patch allows me to restart OK.
{"timestamp":"2014-12-26T17:41:42.569722+0000","level":"warn","message":"received signal","signal":"TERM"}
{"timestamp":"2014-12-26T17:41:42.570002+0000","level":"warn","message":"stopping"}
{"timestamp":"2014-12-26T17:41:42.570101+0000","level":"warn","message":"unsubscribing from keepalive and result queues"}
{"timestamp":"2014-12-26T17:41:42.570391+0000","level":"warn","message":"resigning as master"}
{"timestamp":"2014-12-26T17:41:42.570501+0000","level":"info","message":"completing handlers in progress","handlers_in_progress_count":2}
Also fixing issue where time posted to influx was in milliseconds, not microseconds.
Hello @sethcall
Can you separate this into 2 pull requests?
Also is yield still necessary ? I was told on #sensu at freenode.org that its no longer necessary. I tested and saw no difference, what version of sensu are you running ?
Thanks for this extension! Just wanted to say that I had to add the yield when using sensu 0.19.2 before the server would restart properly.
:+1: Same bug with Sensu 0.20.1 with the extension@master
# service sensu-server stop
* Stopping sensu-server
* Timed out waiting for sensu-server to stop
# sensu-server -V
0.20.1
@sethcall can you rebase with master?
Could you also reword the commits by removing the *
and place the verbs in the infinitive ?