prometheus

package
v3.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp(t *gotext.Locale, conf *config.Config, taskRepo biz.TaskRepo) *App

func (*App) ExporterList

func (s *App) ExporterList(w http.ResponseWriter, r *http.Request)

ExporterList 获取 Exporter 列表及状态

func (*App) GetAlertmanagerConfig

func (s *App) GetAlertmanagerConfig(w http.ResponseWriter, r *http.Request)

GetAlertmanagerConfig 获取 Alertmanager 配置

func (*App) GetConfig

func (s *App) GetConfig(w http.ResponseWriter, r *http.Request)

func (*App) GetConfigTune

func (s *App) GetConfigTune(w http.ResponseWriter, r *http.Request)

GetConfigTune 获取 Prometheus 全局配置调整参数

func (*App) GetExporterConfig

func (s *App) GetExporterConfig(w http.ResponseWriter, r *http.Request)

GetExporterConfig 获取 Exporter 配置

func (*App) InstallExporter

func (s *App) InstallExporter(w http.ResponseWriter, r *http.Request)

InstallExporter 安装 Exporter(异步任务)

func (*App) Load

func (s *App) Load(w http.ResponseWriter, r *http.Request)

func (*App) RestartExporter

func (s *App) RestartExporter(w http.ResponseWriter, r *http.Request)

RestartExporter 重启 Exporter

func (*App) Route

func (s *App) Route(r chi.Router)

func (*App) StartExporter

func (s *App) StartExporter(w http.ResponseWriter, r *http.Request)

StartExporter 启动 Exporter

func (*App) StopExporter

func (s *App) StopExporter(w http.ResponseWriter, r *http.Request)

StopExporter 停止 Exporter

func (*App) UninstallExporter

func (s *App) UninstallExporter(w http.ResponseWriter, r *http.Request)

UninstallExporter 卸载 Exporter(异步任务)

func (*App) UpdateAlertmanagerConfig

func (s *App) UpdateAlertmanagerConfig(w http.ResponseWriter, r *http.Request)

UpdateAlertmanagerConfig 更新 Alertmanager 配置

func (*App) UpdateConfig

func (s *App) UpdateConfig(w http.ResponseWriter, r *http.Request)

func (*App) UpdateConfigTune

func (s *App) UpdateConfigTune(w http.ResponseWriter, r *http.Request)

UpdateConfigTune 更新 Prometheus 全局配置调整参数

func (*App) UpdateExporterConfig

func (s *App) UpdateExporterConfig(w http.ResponseWriter, r *http.Request)

UpdateExporterConfig 更新 Exporter 配置

type ConfigTune

type ConfigTune struct {
	ScrapeInterval     string `form:"scrape_interval" json:"scrape_interval"`
	EvaluationInterval string `form:"evaluation_interval" json:"evaluation_interval"`
	ScrapeTimeout      string `form:"scrape_timeout" json:"scrape_timeout"`
}

ConfigTune Prometheus 全局配置调整

type Exporter

type Exporter struct {
	Name        string `json:"name"`
	Slug        string `json:"slug"`
	Description string `json:"description"`
	Installed   bool   `json:"installed"`
	Running     bool   `json:"running"`
	HasConfig   bool   `json:"has_config"`
}

Exporter Prometheus Exporter 信息

type ExporterConfig

type ExporterConfig struct {
	Config string `form:"config" json:"config" validate:"required"`
}

ExporterConfig Exporter 配置更新请求

type ExporterSlug

type ExporterSlug struct {
	Slug string `form:"slug" json:"slug" validate:"required"`
}

ExporterSlug Exporter 操作请求

type UpdateConfig

type UpdateConfig struct {
	Config string `form:"config" json:"config" validate:"required"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL