【问题标题】:How to get NFS Free Disk Space on Prometheus如何在 Prometheus 上获取 NFS 可用磁盘空间
【发布时间】:2020-03-06 14:08:09
【问题描述】:

我正在尝试在 prometheus 中获取 NFS 服务器的状态以及该服务器上的可用磁盘空间。

我的配置是

服务器1:

  • docker 已安装
  • 带有 prometheus/grafana ...等的容器

服务器2:

  • nfsd 服务器

我想知道nfsd在prometheus上的状态(如果可能,不需要在server2上安装docker)

问候,

阿斯汀

LE:ElasticSearch 也可以用作源(不是强制 Prometheus)

【问题讨论】:

  • 没有人有想法?

标签: prometheus nfs exporter


【解决方案1】:

您可以使用node_exporter。它导出 nfs 和 nfsd 指标:

nfs Exposes NFS client statistics from /proc/net/rpc/nfs. This is the same information as nfsstat -c.   Linux
nfsd Exposes NFS kernel server statistics from /proc/net/rpc/nfsd. This is the same information as nfsstat -s.  Linux

【讨论】:

  • 我知道...并尝试了多次,但遇到了一些问题。我只是说再试一次,现在似乎奏效了。谢谢
  • Heisenbugs 是最好的 :)
【解决方案2】:

如果由于某种原因无法安装节点导出器,可以使用volume_exporter

您可以将其添加为边车

      - name: volume-exporter
      image:  mnadeem/volume_exporter
      imagePullPolicy: "Always"
      args:
        - --volume-dir=prometheus:/prometheus
      ports:
      - name: metrics-volume
        containerPort: 9888
      volumeMounts:
      - mountPath: /prometheus
        name: prometheus-data
        readOnly: true

【讨论】:

    猜你喜欢
    • 2019-12-12
    • 2010-11-26
    • 1970-01-01
    • 1970-01-01
    • 2012-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多