storage_config Loki的存储引擎配置,这个区块里面,主要定义的是各类存储的一些基本信息。只要你愿意,甚至可以把Loki支持的数据存储都加上 ,当今天小白子只拿filesystem、S3来做原始日志存储,boltdb和cassandra来做index存储 schema_config 这里面主要定义的是Loki数据存储的策略。从默认的配置里面可以得到的信息是Loki里面...
你可以选择将日志存储在本地文件系统中,或者使用其他存储后端,如 S3 或 GCS。 importrequestsdefconfigure_loki_storage():url="http://localhost:3100/api/prom/push"data={"storage":{"type":"filesystem","config":{"dir":"/var/log/loki"}}}response=requests.post(url,json=data)returnresponse.status_...
storage_config:boltdb_shipper:active_index_directory: /opt/app/loki/boltdb-shipper-activecache_location: /opt/app/loki/boltdb-shipper-cachecache_ttl: 24h # Can be increased for faster performance over longer query periods, uses more disk spaceshared_store: filesystemfilesystem:directory: /opt/app...
ExecStart=/etc/promtail/promtail-linux-amd64-config.file/etc/promtail/promtail.yaml[Install]WantedBy=multi-user.target 四、启用服务[root@loki~]# systemctl start promtail.service[root@loki~]# systemctl start loki.service[root@loki~]# systemctl start grafana-server.service 五、加入开机启动[roo...
storage_config: boltdb: directory: /tmp/loki/index filesystem: directory: /tmp/loki/chunks limits_config: enforce_metric_name:false reject_old_samples:true reject_old_samples_max_age: 168h chunk_store_config: max_look_back_period: 0s ...
object_store: filesystem # 持久化方式:本地文件 schema: v11 store: boltdb-shipper storage_config: boltdb_shipper: active_index_directory: /loki/boltdb-index # index 目录 cache_location: /loki/boltdb-cache # cache 目录 filesystem: directory: /loki/chunks # chunks 目录 ...
在做Loki升级到2.0版本时,要注意的是最好新增加一个storage schema来声明boltdb。 schema_config: configs: - from: 2018-04-15 store: boltdb object_store: filesystem schema: v11 index: prefix: index_ period: 168h - from: 2020-10-24
-from:2018-04-15store:boltdbobject_store:filesystemschema:v11index:prefix:index_period:168hstorage_config:boltdb:directory:/tmp/loki/indexfilesystem:directory:/tmp/loki/chunkslimits_config:enforce_metric_name:falsereject_old_samples:truereject_old_samples_max_age:168hchunk_store_config:...
在Loki配置中,你可以定义如下配置以指定索引和块的存储路径: 代码语言:javascript 复制 storage_config:boltdb_shipper:active_index_directory:/path/to/loki/indexcache_location:/path/to/loki/index_cacheshared_store:filesystemfilesystem:directory:/path/to/loki/chunks...
storage_config:boltdb:# BoltDB索引文件的位置directory:/tmp/loki/index filesystem:directory:/tmp/loki/chunks limits_config:enforce_metric_name:falsereject_old_samples:truereject_old_samples_max_age:168h chunk_store_config:max_look_back_period:0s ...