zoukankan      html  css  js  c++  java
  • prometheus的坑

    prometheus是一个用于监控k8s集群状态的工具.今天在主机上配置这个东西,遇到了一个坑,调查了一段时间才解决,记之.

    首先,根据网上的教程,利用helm安装这个东西很方便,只要三条指令(ref:https://itnext.io/kubernetes-monitoring-with-prometheus-in-15-minutes-8e54d1de2e13)

    $ helm repo add coreos https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/
    $ helm install coreos/prometheus-operator --name prometheus-operator --namespace monitoring
    $ helm install coreos/kube-prometheus --name kube-prometheus --set global.rbacEnable=true --namespace monitoring

    但是,监控系统却没有正确的启动.经过一番调查,发现是有两个pod挂了,切到他们的container里面,进一步发现挂掉的container的

    log信息是相同的:

    再经过一番调查,在prometheus的文档中发现下面这段话:

    github.com/coreos/prometheus-operator/vendor/github.com/fsnotify/fsnotify/README.md

    How many files can be watched at once?

    There are OS-specific limits as to how many watches can be created:

    • Linux: /proc/sys/fs/inotify/max_user_watches contains the limit, reaching this limit results in a "no space left on device" error.
    • BSD / OSX: sysctl variables "kern.maxfiles" and "kern.maxfilesperproc", reaching these limits results in a "too many open files" error.

    原来是要达到了系统所允许的watch文件数目的上限.修改文件/proc/sys/fs/inotify/max_user_watches contains的值,再次部署,成功.




  • 相关阅读:
    JavaScript表单编程
    JavaScript事件模型
    DOM总结
    CSS3 媒体查询响应式布局
    BOM总结
    JS实现文字图片无缝滚动
    深入理解jQuery事件绑定机制
    被你忽略的jQuery常用方法“特异功能”
    关于BOM的学习总结
    Hello,World!
  • 原文地址:https://www.cnblogs.com/elnino/p/9707890.html
Copyright © 2011-2022 走看看