- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 Loki 的新手,在 Loki 中发出了警报,但我在 Alertmanager 中没有看到任何通知。 Loki 工作正常(收集日志),Alertmanager 也正常(从其他来源获取警报),但来自 loki 的日志不会推送到 alertmanager。
洛基配置:
auth_enabled: false
server:
http_listen_port: 3100
ingester:
lifecycler:
address: 127.0.0.1
ring:
kvstore:
store: inmemory
replication_factor: 1
final_sleep: 0s
chunk_idle_period: 1h # Any chunk not receiving new logs in this time will be flushed
max_chunk_age: 1h # All chunks will be flushed when they hit this age, default is 1h
chunk_target_size: 1048576 # Loki will attempt to build chunks up to 1.5MB, flushing first if chunk_idle_period or max_chunk_age is reached first
chunk_retain_period: 30s # Must be greater than index read cache TTL if using an index cache (Default index read cache TTL is 5m)
max_transfer_retries: 0 # Chunk transfers disabled
schema_config:
configs:
- from: 2020-10-24
store: boltdb-shipper
object_store: filesystem
schema: v11
index:
prefix: index_
period: 24h
storage_config:
boltdb_shipper:
active_index_directory: /loki/boltdb-shipper-active
cache_location: /loki/boltdb-shipper-cache
cache_ttl: 24h # Can be increased for faster performance over longer query periods, uses more disk space
shared_store: filesystem
filesystem:
directory: /loki/chunks
compactor:
working_directory: /loki/boltdb-shipper-compactor
shared_store: filesystem
limits_config:
reject_old_samples: true
reject_old_samples_max_age: 168h
chunk_store_config:
max_look_back_period: 0s
table_manager:
retention_deletes_enabled: false
retention_period: 0s
ruler:
storage:
type: local
local:
directory: etc/loki/rules
rule_path: /etc/loki/
alertmanager_url: http://171.11.3.160:9093
ring:
kvstore:
store: inmemory
enable_api: true
Docker-compose Loki:
loki:
image: grafana/loki:2.0.0
container_name: loki
ports:
- "3100:3100"
volumes:
- ./loki/etc/local-config.yaml:/etc/loki/local-config.yaml
- ./loki/etc/rules/rules.yaml:/etc/loki/rules/rules.yaml
command:
- '--config.file=/etc/loki/local-config.yaml'
洛基规则:
groups:
- name: rate-alerting
rules:
- alert: HighLogRate
expr: |
count_over_time(({job="grafana"})[1m]) >=0
for: 1m
有人知道问题出在哪里吗?
最佳答案
我终于让它工作了。
下面是我的统治者配置
ruler:
storage:
type: local
local:
directory: /etc/loki/rulestorage
rule_path: /etc/loki/rules
alertmanager_url: http://alertmanager:9093
ring:
kvstore:
store: inmemory
enable_api: true
enable_alertmanager_v2: true
在目录下创建
繁荣
关于yaml - Loki 没有提醒 Alertmanager,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67213990/
我正在尝试将我的日志从 .netcore 3.1 API 发送到 Loki 服务器。为此,我正在使用 Serilog-Sinks-Loki 金块包。 当我运行我的代码时,日志会立即发送,我可以在 Gr
我在 VC express 2008 下使用 Loki::Singleton、Loki::SmartPtr 和 std::vector 时遇到了问题. 以下是我的来源。 #include #incl
前面我们介绍了 Loki 的一些基本使用配置,但是对 Loki 还是了解不够深入,官方文档写得较为凌乱,而且没有跟上新版本,为了能够对 Loki 有一个更深入的认识,做到有的放矢,这
我正在研究loki源代码。下面是MakeTypelist,这让我感到困惑。 class NullType {}; template struct Typelist { typedef T H
我使用官方 helm 图表在 EKS 中运行 loki + grafana + prometheus。 我想根据错误日志消息发送警报,为此我正在尝试使用 loki 标尺。 以下是标尺配置 ruler:
我正在尝试配置录制规则,根据文档,目前还不清楚如何设置。 我在 /loki/rules 中配置了 rules.yml 文件目录。根据文档 Recording rules ,我执行我自己的规则: nam
我正在 Grafana 上开发基于 Loki 的仪表板。我有一个用于在 Loki 跟踪日志中搜索文本的面板,当前查询如下: {job="abc-service"} |~ "searchTrace" |
我是 Loki 的新手,在 Loki 中发出了警报,但我在 Alertmanager 中没有看到任何通知。 Loki 工作正常(收集日志),Alertmanager 也正常(从其他来源获取警报),但来
我正在使用 Grafana Loki,我需要计算特定时间间隔内特定日志消息的总数。例如,我需要从 12:00:00 到 14:00:00 期间的日志消息“some-text”的总数。我刚刚找到了以下方
我的集群中有一个 grafana Loki 日志。我可以看到我的日志,但目前该集群已不再使用,我想删除它,但我仍然有一些日志,我想提取 Loki 并可能将其存储在我的系统本地或 Azure 上桶。 有
我已经使用 grafana/loki-stack 安装了 Grafana、Loki、Promtail 和 Prometheus . 我还使用 Nginx helm chart 设置了 Nginx .
[更新]我后来发现了一些例子,如下: this.db = new Loki("viewsaving", { autosave: true,
有没有办法在 loki 中指定复合唯一索引?我尝试过类似的方法: db.addCollection('contents', {unique: ['id', 'wsID']}); 但这似乎产生了 2 个
我的集群中有一个 grafana Loki 日志。我可以看到我的日志,但目前该集群已不再使用,我想删除它,但我仍然有一些日志,我想提取 Loki 并可能将其存储在我的系统本地或 Azure 上桶。 有
我在项目中使用 Loki::Functor 来构建简单的事件系统。该事件的处理函数带有一些参数。在本例中,它称为 PrintEventString。为了将其放入队列中,事件处理程序必须具有相同的原型(
我已经使用 grafana/loki-stack 安装了 Grafana、Loki、Promtail 和 Prometheus . 我还使用 Nginx helm chart 设置了 Nginx .
我正在尝试在使用 VC8 编译的项目中使用 Loki::Factory(我不允许切换到更新的编译器)。当程序退出时我遇到了一个问题,我可以用这个基本代码重现这个问题(这是你在使用工厂时可能想要实现的最
我正在尝试在浏览器应用中使用 loki.js。我在 HTML 中包含了以下脚本 但是下面的js代码给了我“unexpected token”错误 db = new loki('test'); 最佳答
我需要使用 Loki 的小对象分配器,但我对它的工作原理感到非常困惑。我已经阅读了文档和许多论坛,但它没有意义:其中一些说使用 STL,其他人使用自定义分配器。我只需要能够通过分配和取消分配不同大小的
Loki库实现了一些非常广泛使用的概念(智能指针、访问者、工厂等)。相关书籍《Modern C++ Design》经常被提及,但库本身并没有被广泛使用。这是为什么呢? 大多数开发人员似乎更喜欢 Boo
我是一名优秀的程序员,十分优秀!