~cypheon/ecertmon

b5c5bf8195baeab6dc021c7cb83df2c01ddcc4e2 — Johann Rudloff 3 months ago c412534
Fix Prometheus metrics output formatting
1 files changed, 2 insertions(+), 2 deletions(-)

M src/metrics_handler.erl
M src/metrics_handler.erl => src/metrics_handler.erl +2 -2
@@ 16,8 16,8 @@ format_metric({Hostname, Port}) ->
  Valid = proplists:get_value(valid, Response, 0),
  Errors = proplists:get_value(errors, Response, 0),
  [
   io_lib:format("tls_cert_expiry{hostname=\"~p\", port=\"~p\"} ~p\n", [Hostname, Port, Valid]),
   io_lib:format("tls_cert_errors{hostname=\"~p\", port=\"~p\"} ~p\n", [Hostname, Port, Errors])
   io_lib:format("tls_cert_expiry{hostname=\"~s\", port=\"~w\"} ~w\n", [Hostname, Port, Valid]),
   io_lib:format("tls_cert_errors{hostname=\"~s\", port=\"~w\"} ~w\n", [Hostname, Port, Errors])
  ].

init(Req0, State) ->