mirror of
https://github.com/valitydev/bender.git
synced 2024-11-06 09:05:23 +00:00
96 lines
2.8 KiB
Plaintext
96 lines
2.8 KiB
Plaintext
[
|
|
{bender, [
|
|
{service, #{
|
|
path => <<"/v1/bender">>
|
|
}},
|
|
|
|
{generator, #{
|
|
path => <<"/v1/stateproc/bender_generator">>,
|
|
schema => machinery_mg_schema_generic,
|
|
url => <<"http://machinegun:8022/v1/automaton">>, % mandatory
|
|
event_handler => [
|
|
scoper_woody_event_handler,
|
|
hay_woody_event_handler
|
|
],
|
|
transport_opts => #{
|
|
max_connections => 1000
|
|
}
|
|
}},
|
|
|
|
{sequence, #{
|
|
path => <<"/v1/stateproc/bender_sequence">>,
|
|
schema => machinery_mg_schema_generic,
|
|
url => <<"http://machinegun:8022/v1/automaton">>, % mandatory
|
|
event_handler => scoper_woody_event_handler, % mandatory
|
|
transport_opts => #{
|
|
max_connections => 1000
|
|
}
|
|
}},
|
|
|
|
{route_opts, #{
|
|
% handler_limits => #{}
|
|
}},
|
|
|
|
{ip, "::"},
|
|
{port, 8022},
|
|
|
|
{protocol_opts, #{
|
|
request_timeout => 5000 % time in ms with no requests before Cowboy closes the connection
|
|
}},
|
|
{shutdown_timeout, 7000}, % time in ms before woody forces connections closing
|
|
|
|
{transport_opts, #{
|
|
handshake_timeout => 5000, % timeout() | infinity, default is 5000
|
|
max_connections => 10000, % maximum number of incoming connections, default is 1024
|
|
num_acceptors => 100 % size of acceptors pool, default is 10
|
|
}},
|
|
|
|
{health_check, #{
|
|
disk => {erl_health, disk , ["/", 99]},
|
|
memory => {erl_health, cg_memory, [99]},
|
|
service => {erl_health, service , [<<"bender">>]}
|
|
}}
|
|
]},
|
|
|
|
{kernel, [
|
|
{logger_sasl_compatible, false},
|
|
{logger_level, debug},
|
|
{logger, [
|
|
{handler, default, logger_std_h, #{
|
|
level => error,
|
|
config => #{
|
|
type => standard_error
|
|
},
|
|
formatter => {logger_formatter, #{
|
|
depth => 30
|
|
}}
|
|
}},
|
|
{handler, console, logger_std_h, #{
|
|
config => #{
|
|
type => {file, "/var/log/bender/log.json"}
|
|
},
|
|
formatter => {logger_logstash_formatter, #{}}
|
|
}}
|
|
]}
|
|
]},
|
|
|
|
{how_are_you, [
|
|
{metrics_publishers, [
|
|
% {hay_statsd_publisher, #{
|
|
% key_prefix => <<"bender.">>,
|
|
% host => "localhost",
|
|
% port => 8125
|
|
% }}
|
|
]}
|
|
]},
|
|
|
|
{os_mon, [
|
|
% for better compatibility with busybox coreutils
|
|
{disksup_posix_only, true}
|
|
]},
|
|
|
|
{scoper, [
|
|
{storage, scoper_storage_logger}
|
|
]}
|
|
].
|