Skip to content

Commit

Permalink
Add rpc endpoint to do light reload
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <[email protected]>
  • Loading branch information
ganmacs committed Jan 6, 2020
1 parent 60440d5 commit d8b8bc6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/fluent/supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ def run_rpc_server
nil
}

@rpc_server.mount_proc('/api/config.gracefulReload') { |req, res|
$log.debug "fluentd RPC got /api/config.gracefulReload request"
unless Fluent.windows?
Process.kill :USR2, $$
end

nil
}

@rpc_server.mount_proc('/api/config.getDump') { |req, res|
$log.debug "fluentd RPC got /api/config.getDump request"
$log.info "get dump in-memory config via HTTP"
Expand Down

0 comments on commit d8b8bc6

Please sign in to comment.