Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Enable Hot Load of Prometheus.yml configurations #2622

Open
srajappa opened this issue May 26, 2021 · 0 comments
Open

Enable Hot Load of Prometheus.yml configurations #2622

srajappa opened this issue May 26, 2021 · 0 comments

Comments

@srajappa
Copy link

srajappa commented May 26, 2021

Prometheus service 0.1.2-2.3.2 on DC/OS v2.1.0 has the following startup configuration.

--web.enable-lifecycle = false

This flag if set true will help0 update the configuration of Prometheus (prometheus.yml) by passing curl -X POST http://localhost:9090/-/reload.

This is especially useful when regular changes of Prom configurations are needed and one doesn't have to restart the entire service.

Proposal

Can you make a change to allow users to pass COMMAND-LINE parameters in config.json

OR

Make changes in svc.yml to include another flag:

  prometheus:
    count: {{PROMETHEUS_COUNT}}
    placement: '{{{PROMETHEUS_PLACEMENT}}}'
    uris:
      - {{BOOTSTRAP_URI}}
      - {{PROMETHEUS_URI}}
      - {{JQ_URI}}
      - {{DCOS_CLI_URI}}
    volume:
      path: discovery
      type: ROOT
      size: 100
    {{#ENABLE_VIRTUAL_NETWORK}}
    networks:
      {{VIRTUAL_NETWORK_NAME}}:
        labels: {{VIRTUAL_NETWORK_PLUGIN_LABELS}}
    {{/ENABLE_VIRTUAL_NETWORK}}
    {{#SERVICE_ACCOUNT_SECRET}}
    secrets:
      service_account_secret:
        secret: {{SERVICE_ACCOUNT_SECRET}}
        file: service_account_secret
    {{/SERVICE_ACCOUNT_SECRET}}
    tasks:
      server:
        goal: RUNNING
        cmd: |
            $MESOS_SANDBOX/bootstrap
            echo $PROMETHEUS_CONFIG | base64 -d > $MESOS_SANDBOX/prometheus.yml
            echo $PROMETHEUS_RULES | base64 -d > $MESOS_SANDBOX/rules.yml
            exec prometheus-*/prometheus --config.file=$MESOS_SANDBOX/prometheus.yml \
              --storage.tsdb.path=$MESOS_SANDBOX/prometheus-storage \
              --web.enable-admin-api \
              --web.listen-address=:$PROMETHEUS_PORT

i.e. --web.enable-lifecycle

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant