ED-226/feat: Add the rest of monitoring tools (#34)

* ED-226/feat: Add the rest of monitoring tools

- how_are_you for metrics
- also fix formatting on configs and app.src

* ED-226/refactor: Fix formatting
This commit is contained in:
Yaroslav Rogov 2021-08-23 19:03:16 +07:00 committed by GitHub
parent c4a94f72e2
commit 4452606bb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 90 additions and 60 deletions

View File

@ -8,9 +8,10 @@
stdlib,
crypto,
woody,
erl_health,
how_are_you,
shamir,
scoper,
erl_health,
msgpack,
lib_combin,
jose,

View File

@ -25,7 +25,8 @@
-type keyring_meta_diff() :: #{
current_key_id => non_neg_integer() | undefined,
keys => #{
keys =>
#{
key_id() => key_meta_diff()
}
| undefined

View File

@ -101,7 +101,8 @@ start_clear(Config) ->
owner => <<"ndiezel">>,
public_keys => #{
enc =>
<<"{\n"
<<
"{\n"
"\"use\": \"enc\",\n"
"\"kty\": \"RSA\",\n"
"\"kid\": \"KUb1fNMc5j9Ei_IV3DguhJh5UOH30uvO7qXq13uevnk\",\n"
@ -119,21 +120,25 @@ start_clear(Config) ->
"DJKC0U2yufePcA3nUJEhtR3UO_tIlHxZvlDSX5eTx4vs5VkFfujNSiPsgH0P"
"EeXABGBFbal7QxU1u0XHXIFwhW5cM8Fs\",\n"
"\"e\": \"AQAB\"\n"
"}">>,
"}"
>>,
sig =>
<<"{\n"
<<
"{\n"
"\"crv\":\"Ed25519\",\n"
"\"kid\":\"K3ZpHNJw3IZYu4fefhImUtB47eSBD4nRmpjWIoGukyg\",\n"
"\"kty\":\"OKP\",\n"
"\"x\":\"hqoiLZvfBzgtFQop3mBzUACee1ycgaT3tJIcKQ2Ndjc\"\n"
"}">>
"}"
>>
}
},
<<"2">> => #{
owner => <<"ndiezel2">>,
public_keys => #{
enc =>
<<"{\n"
<<
"{\n"
"\"use\": \"enc\",\n"
"\"kty\": \"RSA\",\n"
"\"kid\": \"JHKqPDhPO8ZnZsloKTHt44UbzYFnKnf_zowfL_zNFRE\",\n"
@ -151,21 +156,25 @@ start_clear(Config) ->
"QXg7JhJUY-gXdMgbdLyY5zrawkwsJhq_Lpsk6dHQsxV35imi7kNkOTnoiI-S"
"pswrACIlThnT56xC5ROuFRxAlrpZef-c\",\n"
"\"e\": \"AQAB\"\n"
"}">>,
"}"
>>,
sig =>
<<"{\n"
<<
"{\n"
"\"crv\":\"Ed25519\",\n"
"\"kid\":\"Q_85NCYwrmJr1vcbPOzO8g31_ohqFLpVoaGysWPwCbc\",\n"
"\"kty\":\"OKP\",\n"
"\"x\":\"JhVaGPlRm67u0oGbgxAgqnfLfXeW0aGjhCrBf_C1Fiw\"\n"
"}">>
"}"
>>
}
},
<<"3">> => #{
owner => <<"ndiezel3">>,
public_keys => #{
enc =>
<<"{\n"
<<
"{\n"
"\"use\": \"enc\",\n"
"\"kty\": \"RSA\",\n"
"\"kid\": \"xBET5c4u0yT6pDb_Cok0exHe_wQVetVpkGKn_1mmn7A\",\n"
@ -183,14 +192,17 @@ start_clear(Config) ->
"yVyAzIvDyOVdSmUPPeGxnI1YWKX-5t5SnlnpWO1Rqqh6RBtxu_1JGfq77d2k"
"hskTaPXxc1E5iyCYLFI0UgreCXpBzSGU\",\n"
"\"e\": \"AQAB\"\n"
"}">>,
"}"
>>,
sig =>
<<"{\n"
<<
"{\n"
"\"crv\":\"Ed25519\",\n"
"\"kid\":\"nwy3plcwQj_b70JJ3maZkN-VFQpjGCVRyIFYNeC0vvs\",\n"
"\"kty\":\"OKP\",\n"
"\"x\":\"af4UVYqUB4g711yGxzKjWvd27c9WY1EQ1a1-fwk0A6w\"\n"
"}">>
"}"
>>
}
}
}}

View File

@ -41,20 +41,26 @@
<<"1">> => #{
owner => <<"ndiezel">>,
public_keys => #{
enc => <<"{
\"use\": \"enc\",
\"kty\": \"RSA\",
\"kid\": \"KUb1fNMc5j9Ei_IV3DguhJh5UOH30uvO7qXq13uevnk\",
\"alg\": \"RSA-OAEP-256\",
\"n\": \"2bxkamUQjD4CN8rcq5Bf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-HRhY4WZDZrULTsi4XWpNSwL4dCml4fs536RKy_TyrnpiXg0ug4JVVaEeo7VIZ593mVhCxC8Ev6FK8tZ2HGGOerUXLpgQdhcp9UwaI_l7jgoWNp1f7SuBqv1mfiw4ziC1yvwyXHTKy-37LjLmVB9EVyjqpkwZgzapaOvHc1ABqJpdOrUh-PyOgq-SduqSkMrvqZEdUeR_KbFVxqbxqWJMrqkl2HOJxOla9cHRowg5ObUBjeMoaTJfqie3t6uRUsFEFMzhIyvo6QMYHooxIdOdwpZ4tpzML6jv9o5DPtN375bKzy-UsjeshYbvad1mbrcxc8tYeiQkDZEIM0KeOdHm5C6neEyY6oF4s1vSYBNCnhE5O-R9dmp8Sk5KEseEkOH5u4G2RsIXBA9z1OTDoy6qF21EvRCGzsGfExfkmPAtzbnS-EHHxbMUiio0ZJoZshYo8dwJY6vSN7UsXBgW1v7GvIF9VsfzRmgkl_3rdemYy28DJKC0U2yufePcA3nUJEhtR3UO_tIlHxZvlDSX5eTx4vs5VkFfujNSiPsgH0PEeXABGBFbal7QxU1u0XHXIFwhW5cM8Fs\",\n"
" \"e\": \"AQAB\"\n"
"}"
>>,
sig =>
<<
"{\n"
" \"crv\":\"Ed25519\",\n"
" \"kid\":\"0S3dDL16upIQpkt5sooMFXeZR4j1O7fZngAWgn_Bmbo\",\n"
" \"kty\":\"OKP\",\n"
" \"x\":\"tIUiRZkBczC152j1ItfvtITl222ZHLcz6wRqUDa0-Ls\"\n"
"}"
>>
}
}
}}
@ -72,12 +78,17 @@
config => #{
type => {file, "/var/log/kds/console.json"}
},
formatter => {logger_logstash_formatter, #{
formatter =>
{logger_logstash_formatter, #{
message_redaction_regex_list => [
"[0-9]{12,19}", %% pan
"[0-9]{2}.[0-9]{2,4}", %% expiration date
"[0-9]{3,4}", %% cvv
"^ey[JI]([a-zA-Z0-9_-]*.?){1,6}" %% JWS and JWE compact representation
%% pan
"[0-9]{12,19}",
%% expiration date
"[0-9]{2}.[0-9]{2,4}",
%% cvv
"[0-9]{3,4}",
%% JWS and JWE compact representation
"^ey[JI]([a-zA-Z0-9_-]*.?){1,6}"
]
}}
}}
@ -99,7 +110,8 @@
]},
{snowflake, [
{max_backward_clock_moving, 1000}, % 1 second
% 1 second
{max_backward_clock_moving, 1000},
{machine_id, hostname_hash}
]},

View File

@ -73,14 +73,18 @@
]}.
{plugins, [
{erlfmt, "0.8.0"},
{rebar3_thrift_compiler,
{git, "https://github.com/rbkmoney/rebar3_thrift_compiler.git", {tag, "0.3.1"}}}
{erlfmt, "1.0.0"},
{rebar3_thrift_compiler, {git, "https://github.com/rbkmoney/rebar3_thrift_compiler.git", {tag, "0.3.1"}}}
]}.
{erlfmt, [
{print_width, 120},
{files, "apps/*/{src,include,test}/*.{hrl,erl}"}
{files, [
"apps/*/{src,include,test}/*.{hrl,erl,app.src}",
"rebar.config",
"elvis.config",
"config/sys.config"
]}
]}.
{overrides, [