首页 > 其他分享 >loki-server config

loki-server config

时间:2024-03-29 14:59:08浏览次数:16  
标签:index period server yaml loki config store

#创建存放loki数据的目录
mkdir /data/loki/{chunks,index} -p

#创建loki的部署目录
mkdir /usr/local/loki

#编辑config.yaml问价,内容如下
auth_enabled: false
server:
http_listen_port: 3100
ingester:
lifecycler:
address: 47.104.76.227
ring:
kvstore:
store: inmemory
replication_factor: 1
final_sleep: 0s
chunk_idle_period: 5m
chunk_retain_period: 30s

schema_config:
configs:
- from: 2022-12-16
store: boltdb
object_store: filesystem
schema: v11
index:
prefix: index_
period: 168h #每张表的时间范围7天

storage_config:
boltdb:
directory: /data/loki/index #索引文件存储地址

filesystem:
directory: /data/loki/chunks #块存储地址

limits_config:
enforce_metric_name: false
reject_old_samples: true
reject_old_samples_max_age: 168h


chunk_store_config:
# 最大可查询历史日期 28天,这个时间必须是schema_config中的period的倍数,否则报错。
max_look_back_period: 672h
# 表的保留期28天
table_manager:
retention_deletes_enabled: true
retention_period: 672h


# 启动loki服务
nohup ./loki-linux-amd64 -config.file=./config.yaml >./loki.log 2>&1 &


./loki-linux-amd64 -config.file=config.yaml 2>&1 &

标签:index,period,server,yaml,loki,config,store
From: https://www.cnblogs.com/walkersss/p/18103833

相关文章

  • wpf write value to config file and read the persisted value
    <Windowx:Class="WpfApp26.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.......
  • 【Piping Server】基本应用方法
    【背景】之前大致介绍了一下轻量的selfHosting可用于局域网提供数据流交换服务的开源工程pipingserver,本篇来具体介绍应用方法,如何安装,运行和使用pipingserver来传输信息。【特征】通过标准HTTP/HTTPS于客户端互连,跨设备无限传输数据流。【使用】在如下页面下载相......
  • msg="Sync \"monitoring/main\" failed: provision alertmanager configuration: ba
    今天在调整k8s监控的时候有个搞错这里做个记录以及处理方法level=infots=2024-03-28T08:30:21.320852843Zcaller=operator.go:742component=alertmanageroperatorkey=monitoring/mainmsg="syncalertmanager"level=errorts=2024-03-28T08:30:21.324600111Zcaller=klo......
  • Sql Server 清理长期存在的无用会话
    DECLARE@killCommandNVARCHAR(1000);DECLARE@sessionIDINT;--定义超时阈值(以分钟为单位)DECLARE@idleTimeThresholdINT=30;--获取超过超时阈值的会话ID列表SELECT@sessionID=session_idFROMsys.dm_exec_sessionsWHEREstatus='sleeping'-......
  • AI 绘画平台难开发,难变现?试试 Stable Diffusion API Serverless 版解决方案
    StableDiffusion模型,已经成为AI行业从传统深度学习时代走向AIGC时代的标志性里程碑。越来越多的开发者借助stable-diffusion-webui(以下简称SDWebUI)能力进行AI绘画领域创业或者业务上新,获得高流量及商业价值,但是面对多客户、高并发的复杂场景,使用原生StableDiffusio......
  • SystemServer 启动流程
    SystemServer启动流程一、介绍SystemServer是Android进入Launcher前的最后准备,顾名思义,它提供了众多由Java语言编写的服务在Zygote自启动过程中,参数boolstartSystemServer为真的话,那么在ZygoteInit.java/main()就会调用函数forkSystemServer()生成SystemSer......
  • ubuntu16.04server版本安装网卡
    设置用户开机进入BIOS里取消勾选SecureBootEnableci30#输入用户名和密码登陆sudopasswdroot#如果是首次登陆,需要设置root密码(密码统一设置123456)su#切换root用户,输入root用户密码安装make工具:fdisk-l#查看安装磁盘为/dev/sdb1mount/dev/sdb1/opt......
  • hiveserver2拒绝连接
    一、报错内容 二、解决办法基本都是core-site.xml文件中没做好代理导致的。在文件中添加如下配置<property><name>hadoop.proxyuser.xxx.hosts</name><value>*</value></property><property><name>hadoop.proxyuser.x......
  • [Kubernetes] Managing Application with Kubernetes - ConfigMaps and Secrets
    IdentifyimportantConfigMapcharacteristics:Helpsdevelopersavoidhard-codingconfigurationvariablesintotheapplicationcode.IsanAPIobjectusedtostorenon-confidentialdatainkey-valuepairs.Doesnotprovidesecrecyorencryption;meantfor......
  • 在 Windows Server 2022 系统中,你可以使用一些组合命令结合系统自带的工具来实现文件
    在WindowsServer2022系统中,你可以使用一些组合命令结合系统自带的工具来实现文件夹同步。以下是一个示例组合命令,结合Robocopy和TaskScheduler来实现文件夹同步:使用Robocopy进行文件夹同步:Robocopy是Windows自带的一个命令行工具,用于复制大量文件和文件夹。你可......