Description of problem: Fedora-provided prometheus is not usable without manual configuration. Please provide at least a default configuration (/etc/prometheus.yml) and a systemd unit file.
Suggestion: # cat /usr/lib/systemd/system/prometheus.service [Unit] Description=Prometheus instance Documentation=https://prometheus.io/docs/prometheus/ Wants=network-online.target After=network-online.target [Service] EnvironmentFile=/etc/sysconfig/prometheus User=prometheus Group=prometheus Type=simple WorkingDirectory=/var/lib/prometheus ExecStart=/usr/bin/prometheus \ --config.file=${CONFIG_FILE} \ --storage.tsdb.path=${STORAGE_TSDB_PATH} \ --web.console.libraries=${WEB_CONSOLE_LIBRARIES_PATH} \ --web.console.templates=${WEB_CONSOLE_TEMPLATES_PATH} \ --web.listen-address=${WEB_LISTEN_ADDRESS} [Install] WantedBy=multi-user.target # cat /etc/sysconfig/prometheus CONFIG_FILE=/etc/prometheus.yml STORAGE_TSDB_PATH=/var/lib/prometheus WEB_CONSOLE_LIBRARIES_PATH=/usr/share/prometheus/console_libraries WEB_CONSOLE_TEMPLATES_PATH=/usr/share/prometheus/consoles WEB_LISTEN_ADDRESS=127.0.0.1:9090 # cat /etc/prometheus.yml # 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' # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ['localhost:9090'] Also, add empty /var/lib/prometheus, /usr/share/prometheus/console_libraries, /usr/share/prometheus/consoles to the package and create the prometheus user+group via systemd-sysusers.
$ prometheus --version prometheus, version (branch: , revision: ) build user: build date: go version: go1.14beta1 I would expect those to be filled with actual build version and date (and perhaps the mockbuild user).
Go SIG doesn't really "take care" of the binaries provided, we mostly need the libraries to build stuff, but we don't often have the expertise to know all the various config. (In reply to Dominik 'Rathann' Mierzejewski from comment #2) > $ prometheus --version > prometheus, version (branch: , revision: ) > build user: > build date: > go version: go1.14beta1 > > I would expect those to be filled with actual build version and date (and > perhaps the mockbuild user). I need to set these ldflags: ldflags: | -X github.com/prometheus/common/version.Version={{.Version}} -X github.com/prometheus/common/version.Revision={{.Revision}} -X github.com/prometheus/common/version.Branch={{.Branch}} -X github.com/prometheus/common/version.BuildUser={{user}}@{{host}} -X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}} (In reply to Dominik 'Rathann' Mierzejewski from comment #1) > Suggestion: > # cat /usr/lib/systemd/system/prometheus.service > [Unit] > Description=Prometheus instance > Documentation=https://prometheus.io/docs/prometheus/ > Wants=network-online.target > After=network-online.target > > [Service] > EnvironmentFile=/etc/sysconfig/prometheus > User=prometheus > Group=prometheus > Type=simple > WorkingDirectory=/var/lib/prometheus > ExecStart=/usr/bin/prometheus \ > --config.file=${CONFIG_FILE} \ > --storage.tsdb.path=${STORAGE_TSDB_PATH} \ > --web.console.libraries=${WEB_CONSOLE_LIBRARIES_PATH} \ > --web.console.templates=${WEB_CONSOLE_TEMPLATES_PATH} \ > --web.listen-address=${WEB_LISTEN_ADDRESS} > > [Install] > WantedBy=multi-user.target > > # cat /etc/sysconfig/prometheus > CONFIG_FILE=/etc/prometheus.yml > STORAGE_TSDB_PATH=/var/lib/prometheus > WEB_CONSOLE_LIBRARIES_PATH=/usr/share/prometheus/console_libraries > WEB_CONSOLE_TEMPLATES_PATH=/usr/share/prometheus/consoles > WEB_LISTEN_ADDRESS=127.0.0.1:9090 > > # cat /etc/prometheus.yml > # 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' > > # metrics_path defaults to '/metrics' > # scheme defaults to 'http'. > > static_configs: > - targets: ['localhost:9090'] > OK > Also, add empty /var/lib/prometheus, > /usr/share/prometheus/console_libraries, /usr/share/prometheus/consoles to > the package and create the prometheus user+group via systemd-sysusers. /var/lib/prometheus should be owned by prometheus user right? I'm not familiar with systemd-sysusers, usually we use shadow-utils for user creation: https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/
This is my prometheus conf: #Type Name ID GECOS Home directory u prometheus - Prometheus /var/lib/prometheus g prometheus - m prometheus prometheus r - 500-900 According to the systemd macros, it should be installed as such: %pre %sysusers_create_package prometheus %{SOURCE4} Everything looks alright to you?
Please check this PR to see if it suits you: https://src.fedoraproject.org/rpms/golang-github-prometheus/pull-request/1#request_diff
Looks good to me, but I'm no expert. Requested review on the Fedora Server mailing list: https://lists.fedoraproject.org/archives/list/server@lists.fedoraproject.org/message/BQSKW5UDFJ54ZZ5OUT7JNHZ5F2NTTNY2/ .
Apparently it was missing the web assets for the frontend toov
FEDORA-2020-a116217589 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-9ea1ff01f8 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9ea1ff01f8
FEDORA-2020-9ea1ff01f8 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-9ea1ff01f8` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9ea1ff01f8 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-8e8039d97c has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-8e8039d97c` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-8e8039d97c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-8e8039d97c has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.