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

Enable Hot Load of Prometheus.yml configurations #2622

@srajappa

Description

@srajappa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions