Skip to content

Commit

Permalink
#828 Feature Prometheus API
Browse files Browse the repository at this point in the history
Signed-off-by: Bangseungjae <[email protected]>
  • Loading branch information
Bangseungjae committed Oct 14, 2024
1 parent ebe649b commit 6e1781e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/restapi/handler/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func ConfigGetPrometheusCounter(params operations.GetMetricsParams) middleware.R

func ConfigGetPrometheusOption(params operations.GetConfigMetricsParams) middleware.Responder {
tk.LogIt(tk.LogDebug, "[API] Prometheus %s API called. url : %s\n", params.HTTPRequest.Method, params.HTTPRequest.URL)
return operations.NewGetConfigMetricsOK().WithPayload(&models.MetricsConfig{Prometheus: options.Opts.Prometheus})
return operations.NewGetConfigMetricsOK().WithPayload(&models.MetricsConfig{Prometheus: &options.Opts.Prometheus})
}

func ConfigPostPrometheus(params operations.PostConfigMetricsParams) middleware.Responder {
Expand Down
7 changes: 3 additions & 4 deletions api/restapi/server.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4100,6 +4100,8 @@ definitions:
description: Retry Count to detect failure
MetricsConfig:
type: object
required:
- prometheus
properties:
prometheus:
type: boolean
Expand Down

0 comments on commit 6e1781e

Please sign in to comment.