Prometheus: Running prometheus providing the path to both the configuration file and the data directory.

Created on 24 Nov 2017  路  3Comments  路  Source: prometheus/prometheus

What did you do?
sudo -u prometheus /usr/local/bin/prometheus \
-config.file /etc/prometheus/prometheus.yml \
-storage.local.path /var/lib/prometheus/
What did you expect to see?
INFO[0000] Starting prometheus (version=2.0.0, branch=master, revision=3afb3fffa3a29c3de865e1172fb740442e9d0133) source="main.go:88"
INFO[0000] Build context (go=go1.8.3, user=root@0aa1b7fc430d, date=20170612-11:44:05) source="main.go:89"
INFO[0000] Host details (Linux 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64 prometheus (none)) source="main.go:90"
INFO[0000] Loading configuration file /etc/prometheus/prometheus.yml source="main.go:252"
INFO[0000] Loading series map and head chunks... source="storage.go:428"
INFO[0000] 543 series loaded. source="storage.go:439"
INFO[0000] Starting target manager... source="targetmanager.go:63"
INFO[0000] Listening on :9090 source="web.go:259"
What did you see instead? Under which circumstances?
prometheus: error: unknown short flag '-s'
Environment
Ubuntu 16.10

  • System information:
    (GNU/Linux 4.8.0-22-generic x86_64)
    insert output of uname -srm here
  • Prometheus version:
    prometheus, version 2.0.0 (branch: HEAD, revision: 0a74f98628a0463dddc90528220c94de5032d1a0)
    build user: root@615b82cb36b6
    build date: 20171108-07:11:59
    go version: go1.9.2

    insert output of prometheus --version here

  • Alertmanager version:

    insert output of alertmanager --version here (if relevant to the issue)

  • Prometheus configuration file:

insert configuration here
  • Alertmanager configuration file:
insert configuration here (if relevant to the issue)
  • Logs:
insert Prometheus and Alertmanager logs relevant to the issue here

Most helpful comment

@msidibeh2017 Please use --config.file and --storage.tsdb.path instead.
https://prometheus.io/docs/prometheus/latest/getting_started/#starting-prometheus

All 3 comments

@msidibeh2017 Please use --config.file and --storage.tsdb.path instead.
https://prometheus.io/docs/prometheus/latest/getting_started/#starting-prometheus

Yep, this is due to breaking change in the flag library. Also read https://prometheus.io/docs/prometheus/latest/migration/

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VR6Pete picture VR6Pete  路  44Comments

beorn7 picture beorn7  路  90Comments

bandesz picture bandesz  路  50Comments

whaike picture whaike  路  48Comments

LordFPL picture LordFPL  路  50Comments