Comments (4)
Hi,
The validation seems to be correct. There is no path
property in inside storage.tsdb
inside the configuration file. https://prometheus.io/docs/prometheus/latest/configuration/configuration/#tsdb
Having said that, I don't know the reason it is possible to configure some aspects of prometheus through command line flags, but not through the configuration file.
My two cents is that it would be nice to have parity between both, but maybe I'm missing some context.
from prometheus.
Ok, one difference to keep in mind is that the configuration file can be reloaded:
From the docs:
Prometheus can reload its configuration at runtime. If the new configuration is not well-formed, the changes will not be applied. A configuration reload is triggered by sending a SIGHUP to the Prometheus process or sending a HTTP POST request to the /-/reload endpoint (when the --web.enable-lifecycle flag is enabled). This will also reload any configured rule files.
https://prometheus.io/docs/prometheus/latest/configuration/configuration/
So I assume that all parameters that cannot be changed in runtime are passed through command line flags.
from prometheus.
Hello, I want to customize the file storage location of Prometheus. How can I implement it?
prometheus.yml
`# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
scrape_timeout is set to the global default (10s).
Storage configuration
storage:
tsdb:
path: "/data/www/Monitoring/cache"
Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
- "first_rules.yml"
- "second_rules.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"]
-
job_name: 'node_exporter'
static_configs:- targets: ['localhost:9100']
-
job_name: 'promtail'
static_configs:- targets: ['localhost:9080']
-
job_name: 'nginx'
metrics_path: /nginx_status
static_configs:- targets: ['localhost:80']
Start:
[Unit]
Description=Prometheus
After=network.target
- targets: ['localhost:80']
[Service]
User=root
ExecStart=/data/www/Monitoring/prometheus/prometheus --config.file=/data/www/Monitoring/prometheus/prometheus.yml
[Install]
WantedBy=multi-user.target
`
from prometheus.
I want to customize the file storage location of Prometheus. How can I implement it?
from prometheus.
Related Issues (20)
- [Feature] Add new labels to time series
- Prometheus Mixin Dashboard: Prometheus/Overview Grafana Dashboard Using Deprecated Angular components HOT 2
- remote write 2.0 - decide how to handle no metadata found
- remote write 2.0 - decide whether addition of metadata should count towards max samples in write request
- remote write 2.0 - update write handler benchmarks for 2.0 format
- remote write 2.0 - DRY the queue manager code HOT 2
- feat: Move remote write receive to runtime reloadable config HOT 1
- [flaky test] TestEvaluations/testdata/native_histograms.test HOT 1
- ui (tests): Add tests for Native histogram helpers HOT 2
- remote write 2.0 - update `TestSampleDelivery` to check for metadata in 2.0 proto
- remote write 2.0 - update test for old samples filtering for 2.0
- @ modifier with future return inconsistent value for sum_over_time HOT 3
- Prometheus stucks on protection from Host Header Injection HOT 1
- SIGSEGV after writing block HOT 5
- Not enough memory resources HOT 2
- `navigator.clipboard` may not be available HOT 2
- Prometheus Staleness Issue on Fedora 39
- Prometheus reload not exist block: opening storage failed
- Metrics in "/actuator/prometheus" are not consistent in a multi nodes environment (kubernetes) HOT 1
- Recommendation for PGO with Prometheus HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prometheus.