Documentation
¶
Index ¶
- type App
- func (s *App) ExporterList(w http.ResponseWriter, r *http.Request)
- func (s *App) GetAlertmanagerConfig(w http.ResponseWriter, r *http.Request)
- func (s *App) GetConfig(w http.ResponseWriter, r *http.Request)
- func (s *App) GetConfigTune(w http.ResponseWriter, r *http.Request)
- func (s *App) GetExporterConfig(w http.ResponseWriter, r *http.Request)
- func (s *App) InstallExporter(w http.ResponseWriter, r *http.Request)
- func (s *App) Load(w http.ResponseWriter, r *http.Request)
- func (s *App) RestartExporter(w http.ResponseWriter, r *http.Request)
- func (s *App) Route(r chi.Router)
- func (s *App) StartExporter(w http.ResponseWriter, r *http.Request)
- func (s *App) StopExporter(w http.ResponseWriter, r *http.Request)
- func (s *App) UninstallExporter(w http.ResponseWriter, r *http.Request)
- func (s *App) UpdateAlertmanagerConfig(w http.ResponseWriter, r *http.Request)
- func (s *App) UpdateConfig(w http.ResponseWriter, r *http.Request)
- func (s *App) UpdateConfigTune(w http.ResponseWriter, r *http.Request)
- func (s *App) UpdateExporterConfig(w http.ResponseWriter, r *http.Request)
- type ConfigTune
- type Exporter
- type ExporterConfig
- type ExporterSlug
- type UpdateConfig
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 (*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) 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) RestartExporter ¶
func (s *App) RestartExporter(w http.ResponseWriter, r *http.Request)
RestartExporter 重启 Exporter
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"`
}
Click to show internal directories.
Click to hide internal directories.