pingcap / pingcap/tiup

ng-monitoring retention can't be set with tiup cluster

Open
#2,084 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/bug
Dominant language
Go
Stars
466
Forks
338
Avg merge
3d 7h
Merged PRs (30d)
8

Description

Bug Report

With TiUP v1.11.0 and TiDB v6.3.0

$ grep -A1 retention <(/tidb-deploy/prometheus-9090/bin/ng-monitoring-server --help 2>&1)
      --retention-period string    Data with timestamps outside the retentionPeriod is automatically deleted
                                   The following optional suffixes are supported: h (hour), d (day), w (week), y (year). If suffix isn't set, then the duration is counted in months (default "1")

Looks like in the topology.yml you can only set the ng_port and not much else. Note that the --retention-period is a flag that could be added in /tidb-deploy/prometheus-9090/scripts/ng-wrapper.sh (which is created by /tidb-deploy/prometheus-9090/scripts/run_prometheus.sh). I don't think there is a way to put this in the /tidb-deploy/prometheus-9090/conf/ngmonitoring.toml.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how topology.yml is handled by TiUP cluster and how /tidb-deploy/prometheus-9090/scripts/run_prometheus.sh creates ng-wrapper.sh. Check the existing ng_port configuration path and the ng-monitoring-server --help output. Done means a cluster deployment can configure and apply retention-period for ng-monitoring.

Written by the indexing model from the issue text.

Assessment

Tech stack
prometheus, shell
Domain
devops, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.