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

the latest configuration is not effective after sending SIGHUP signal #1363

Closed
guanglinlv opened this Issue Feb 2, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@guanglinlv
Copy link

guanglinlv commented Feb 2, 2016

hello,

i got a problem about the reload of the configuration,following is my debug information:

  • version
prometheus,version 0.16.2 (branch: stable,revision: 287d9b2)
build user:    @9f8f0f8d724a
build date:    20160122-21:30:47
go version:   1.5.3
  • configuration
# my global config
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).

  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
      monitor: 'codelab-monitor'

# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
  # - "first.rules"
  # - "second.rules"

# A scrape configuration containing exactly one endpoint to scrape: 
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s
    scrape_timeout: 10s

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    target_groups:
      - targets: ['localhost:9090']

  - job_name: 'federate'
    scrape_interval: 15s

    honor_labels: true
    metrics_path: /federate

    params:
      'match[]':
        - '{job=~"^prometheus_.*"}'

    consul_sd_configs:
      - server: '10.63.69.78:8500'
        datacenter: 'sz-dev'

    relabel_configs:
      - source_labels: ['__meta_consul_service_id']
        regex:         '(.*)'
        target_label:  'flag'
        replacement:   '$1'
      - source_labels: ['__meta_consul_service_id']
        regex:         '^federate_prometheus_.*'
        action:        'keep'
  • logs
time="2016-02-02T16:25:13+08:00" level=info msg="Loading configuration file /etc/prometheus/prometheus.yml" source="main.go:196"
time="2016-02-02T16:25:13+08:00" level=info msg="Stopping target manager ..." source="targetmanager.go:203"
time="2016-02-02T16:25:13+08:00" level=info msg="Target manager stopped." source="targetmanager.go:216"
time="2016-02-02T16:25:13+08:00" level=info msg="Starting target manager..." source="targetmanager.go:114"

then i

kill -HUP `pgrep prometheus

check the server:9090/status the latest configuration is not loaded. and the problem only happened in the federate case.

is a problem or limitation in federate case?

thanks.

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Feb 2, 2016

Any new logs after sending the SIGHUP? There should a log message if the reload failed.

You say you want to reload a configuration file, so there must be one before and one after file, right? I only see one here and cannot tell what the supposed change was.

@guanglinlv

This comment has been minimized.

Copy link
Author

guanglinlv commented Feb 3, 2016

@fabxc , that is the original file, you can do any changes on it, like some new labels or some new job. there is no other logs initiate a reload failure. the problem is reproduced in my environment. any debug information needed?

@guanglinlv

This comment has been minimized.

Copy link
Author

guanglinlv commented Feb 3, 2016

@fabxc ,got it, i am used docker to start prometheus and mount the prometheus.yml on the host. any changes in host file is not synced to container file because the permissions of the host file.

so, the issue can be closed.

thanks.

@guanglinlv guanglinlv closed this Feb 3, 2016

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Feb 3, 2016

Thanks for the updates. Glad this is resolved.

@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.