mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 12:31:07 +01:00
lib/promscrape/discovery: missing changes after b4ad3a3b4c
This commit is contained in:
parent
20af29294e
commit
ec23ab6bc2
@ -48,10 +48,9 @@ func getNodesLabels(cfg *apiConfig) ([]*promutils.Labels, error) {
|
|||||||
|
|
||||||
func getNodes(cfg *apiConfig) ([]node, error) {
|
func getNodes(cfg *apiConfig) ([]node, error) {
|
||||||
filtersQueryArg := ""
|
filtersQueryArg := ""
|
||||||
if cfg.role == roleNodes {
|
if cfg.role == "nodes" {
|
||||||
filtersQueryArg = cfg.filtersQueryArg
|
filtersQueryArg = cfg.filtersQueryArg
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := cfg.getAPIResponse("/nodes", filtersQueryArg)
|
resp, err := cfg.getAPIResponse("/nodes", filtersQueryArg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot query dockerswarm api for nodes: %w", err)
|
return nil, fmt.Errorf("cannot query dockerswarm api for nodes: %w", err)
|
||||||
|
@ -60,10 +60,9 @@ func getServicesLabels(cfg *apiConfig) ([]*promutils.Labels, error) {
|
|||||||
|
|
||||||
func getServices(cfg *apiConfig) ([]service, error) {
|
func getServices(cfg *apiConfig) ([]service, error) {
|
||||||
filtersQueryArg := ""
|
filtersQueryArg := ""
|
||||||
if cfg.role == roleServices {
|
if cfg.role == "services" {
|
||||||
filtersQueryArg = cfg.filtersQueryArg
|
filtersQueryArg = cfg.filtersQueryArg
|
||||||
}
|
}
|
||||||
|
|
||||||
data, err := cfg.getAPIResponse("/services", filtersQueryArg)
|
data, err := cfg.getAPIResponse("/services", filtersQueryArg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot query dockerswarm api for services: %w", err)
|
return nil, fmt.Errorf("cannot query dockerswarm api for services: %w", err)
|
||||||
|
@ -63,10 +63,9 @@ func getTasksLabels(cfg *apiConfig) ([]*promutils.Labels, error) {
|
|||||||
|
|
||||||
func getTasks(cfg *apiConfig) ([]task, error) {
|
func getTasks(cfg *apiConfig) ([]task, error) {
|
||||||
filtersQueryArg := ""
|
filtersQueryArg := ""
|
||||||
if cfg.role == roleTasks {
|
if cfg.role == "tasks" {
|
||||||
filtersQueryArg = cfg.filtersQueryArg
|
filtersQueryArg = cfg.filtersQueryArg
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := cfg.getAPIResponse("/tasks", filtersQueryArg)
|
resp, err := cfg.getAPIResponse("/tasks", filtersQueryArg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot query dockerswarm api for tasks: %w", err)
|
return nil, fmt.Errorf("cannot query dockerswarm api for tasks: %w", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user