how long prometheus save data?
https://stackoverflow.com/questions/59298811/increasing-prometheus-storage-retention
Theo như sách báo nói thì promethues sẽ lưu mặc định là 15 ngày storage.tsdb.retention.time=15d
- prometheus install theo kiểu package thì tìm trong
vi /etc/systemd/system/prometheus.service
>>>>>>>>>>
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target
[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/prometheus \
--config.file /etc/prometheus/prometheus.yml \
--storage.tsdb.path /var/lib/prometheus/ \
--web.console.templates=/etc/prometheus/consoles \
--web.console.libraries=/etc/prometheus/console_libraries \
--web.external-url=http://34.89.26.156:9090 \
--storage.tsdb.retention.time=1y
[Install]
WantedBy=multi-user.target
- prometheus trong k8s thì bạn tự mò thử text trên nhé