spring-boot - 麋鹿 : One or more required cgroup files or directories not found:/proc/self/cgroup

标签 spring-boot elasticsearch logstash kibana elastic-stack

我已经配置了如下的logstash配置来读取spring boot生成的日志以推送到 Elasticsearch ,但是即使logstash成功启动也没有创建索引,

配置文件:

input {
    file {
        path => "C:\workspace\app\logback\applogs.log"
        codec => "json"
        type => "logback"
    }
}
 
output {
    if [type]=="logback" {
         elasticsearch {
             hosts => [ "localhost:9200" ]
             index => "logback-test"
        }
    }
}

enter image description here

提前致谢!

最佳答案

对于 windows,您应该将路径中的字符从“\”更改为“/”,特别是 windows 10。 因此,您可以像下面这样重写路径:

 file {
        path => "C:/workspace/app/logback/applogs.log" // not like "C:\workspace\app\logback\applogs.log"
        codec => "json"
        type => "logback"
    }

关于spring-boot - 麋鹿 : One or more required cgroup files or directories not found:/proc/self/cgroup,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56375134/

相关文章:

hibernate - NoClassDefFound错误: org/hibernate/boot/MetadataBuilder

java - Spring Reactor与服务器发送事件连接问题

c# - NEST 2.0和ElasticSearch 2.0无法模拟 “return all”查询

elasticsearch - 在 Elasticsearch 的响应字段中格式化日期

spring - 应用启动运行时如何重新加载WebSecurityConfigurerAdapter的Configure方法

spring - 使用 Cron 安排任务,允许动态更新

elasticsearch - 嵌套聚合的问题ElasticSearch:在最大值之后求和

输出中的logstash if 语句

elasticsearch - 我可以通过 elasticsearch-template.json 设置 logstash 默认的 elasticsearch 映射吗

elasticsearch - Logstash 在解析日期时省略夏令时