Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus failing to start as it cannot validate alertmanager url #2022

Closed
mg03 opened this Issue Sep 22, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@mg03
Copy link

mg03 commented Sep 22, 2016

What did you do?

prometheus -alertmanager.url=http://alertmanager-infra--0-4-1--mtq3ndm0odqxnw.service.us-east-1.consul:9093 -config.file=/etc/prometheus/prometheus.yml -log.level=debug

What did you expect to see?
Prometheus should start

What did you see instead? Under which circumstances?
ERRO[0000] invalid Alertmanager URL: http://alertmanager-infra--0-4-1--mtq3ndm0odqxnw.service.us-east-1.consul source=main.go:64

Environment
Docker Using phusion base image . Running docker with prometheus in net=host mode

  • System information:

    uname -srm
    Linux 4.4.0-31-generic x86_64

  • Prometheus version:

    prometheus -version
    prometheus, version 1.0.1 (branch: master, revision: be40190)
    build user: root@e881b289ce76
    build date: 20160722-19:54:46
    go version: go1.6.2

  • Alertmanager version:

  • Prometheus configuration file:

global:
  scrape_interval:     15s # By default, scrape targets every 15 seconds.
  evaluation_interval: 15s # By default, scrape targets every 15 seconds.
  # scrape_timeout is set to the global default (10s).

  # The labels to add to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
    apptype: 'infra'
    datacenter: 'us-east-1'

rule_files:
  - /data/alert_rules/*.rules

# A list of scrape configurations.
scrape_configs:

  - job_name: 'all-consul'
    scrape_interval: 10s
    scrape_timeout:  10s
    consul_sd_configs:
      - server: 'localhost:8500'
        datacenter: us-east-1
        services: [] 
    relabel_configs:
      - source_labels: [__meta_consul_service]
        target_label: job
        # Use the instance ID as the instance label
      - source_labels: ['__address__']
        regex: '^(.+):.+'
        target_label: __address__
        replacement: '${1}:9100'
      - source_labels: [__meta_consul_node]
        target_label: instance



  • Alertmanager configuration file:
insert configuration here (if relevant to the issue)
  • Logs:
ERRO[0000] invalid Alertmanager URL: http://alertmanager-infra--0-4-1--mtq3ndm0odqxnw.service.us-east-1.consul  source=main.go:64

I see yall are using github.com/asaskevich/govalidator

I did the following as a test

checkurl.go 

package main

import (
  valid "github.com/asaskevich/govalidator"
)

func main() {
    println(valid.IsURL(`http://alertmanager-infra--0-4-1--mtq3ndm0odqxnw.service.us-east-1.consul:9093`))
}

When i run it

go run checkurl.go 
true

Why is prometheus failing to start up even when the url is valid?

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Sep 22, 2016

Updating of the govalidator version fixes this issue. Fix in #2023.

@mg03

This comment has been minimized.

Copy link
Author

mg03 commented Sep 22, 2016

Thanx @fabxc .
Qs: Will there be a version to download from https://prometheus.io/download/ or someplace or do i need to pull from master and build ?

fabxc added a commit that referenced this issue Sep 22, 2016

juliusv added a commit that referenced this issue Sep 22, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.