File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
src/MalwareSampleExchange.Console Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ WORKDIR /data
55RUN apk add curl
66ENTRYPOINT dotnet /data/MalwareSampleExchange.Console.dll
77
8- ENV ASPNETCORE_URLS="http://0.0.0.0:8080"
8+ ENV ASPNETCORE_URLS="http://0.0.0.0:8080;http://0.0.0.0:9110 "
99
1010LABEL org.opencontainers.image.title="Malware Sample Exchange (MSE) Image" \
1111 org.opencontainers.image.description="Malware Sample Exchange (MSE)" \
Original file line number Diff line number Diff line change 1+ namespace MalwareSampleExchange . Console ;
2+
3+ public class PrometheusOptions
4+ {
5+ public int Port { get ; set ; } = 9110 ;
6+ }
Original file line number Diff line number Diff line change @@ -130,7 +130,12 @@ public void ConfigureServices(IServiceCollection services)
130130
131131 public void Configure ( IApplicationBuilder app )
132132 {
133- app . UsePrometheusServer ( options => options . Port = 8080 ) ;
133+ app . UsePrometheusServer ( q =>
134+ {
135+ var options = new PrometheusOptions ( ) ;
136+ _configuration . GetSection ( "Prometheus" ) . Bind ( options ) ;
137+ q . Port = options . Port ;
138+ } ) ;
134139
135140 app . UsePrometheusRequestDurations ( q =>
136141 {
You can’t perform that action at this time.
0 commit comments