Heapster Metrics

error: Metrics not available for pod 解决方案 环境 win10系统,开启了WSL2 docker for windows,开启了WSL集成 minikube for windows kubectl for windows 缘由 kubectl top po 查看pod的资源使用情况时报错: error: Metrics not available for pod 解决方案 在metrics-server的启动参数里添加以下两个命令: --kubelet-insecure-tls --kubelet-preferred-address-types=In 阅读详情

Metrics

Heapster exports the following metrics to its backends.

Metric NameDescription
cpu/limitCPU hard limit in millicores.
cpu/node_capacityCpu capacity of a node.
cpu/node_allocatableCpu allocatable of a node.
cpu/node_reservationShare of cpu that is reserved on the node allocatable.
cpu/node_utilizationCPU utilization as a share of node allocatable.
cpu/requestCPU request (the guaranteed amount of resources) in millicores.
cpu/usageCumulative CPU usage on all cores.
cpu/usage_rateCPU usage on all cores in millicores.
filesystem/usageTotal number of bytes consumed on a filesystem.
filesystem/limitThe total size of filesystem in bytes.
filesystem/availableThe number of available bytes remaining in a the filesystem
filesystem/inodesThe number of available inodes in a the filesystem
filesystem/inodes_freeThe number of free inodes remaining in a the filesystem
disk/io_read_bytesNumber of bytes read from a disk partition
disk/io_write_bytesNumber of bytes written to a disk partition
disk/io_read_bytes_rateNumber of bytes read from a disk partition per second
disk/io_write_bytes_rateNumber of bytes written to a disk partition per second
memory/limitMemory hard limit in bytes.
memory/major_page_faultsNumber of major page faults.
memory/major_page_faults_rateNumber of major page faults per second.
memory/node_capacityMemory capacity of a node.
memory/node_allocatableMemory allocatable of a node.
memory/node_reservationShare of memory that is reserved on the node allocatable.
memory/node_utilizationMemory utilization as a share of memory allocatable.
memory/page_faultsNumber of page faults.
memory/page_faults_rateNumber of page faults per second.
memory/requestMemory request (the guaranteed amount of resources) in bytes.
memory/usageTotal memory usage.
memory/cacheCache memory usage.
memory/rssRSS memory usage.
memory/working_setTotal working set usage. Working set is the memory being used and not easily dropped by the kernel.
accelerator/memory_totalMemory capacity of an accelerator.
accelerator/memory_usedMemory used of an accelerator.
accelerator/duty_cycleDuty cycle of an accelerator.
network/rxCumulative number of bytes received over the network.
network/rx_errorsCumulative number of errors while receiving over the network.
network/rx_errors_rateNumber of errors while receiving over the network per second.
network/rx_rateNumber of bytes received over the network per second.
network/txCumulative number of bytes sent over the network
network/tx_errorsCumulative number of errors while sending over the network
network/tx_errors_rateNumber of errors while sending over the network
network/tx_rateNumber of bytes sent over the network per second.
uptimeNumber of milliseconds since the container was started.

All custom (aka application) metrics are prefixed with 'custom/'.

Labels

Heapster tags each metric with the following labels.

Label NameDescription
pod_idUnique ID of a Pod
pod_nameUser-provided name of a Pod
container_base_imageBase image for the container
container_nameUser-provided name of the container or full cgroup name for system containers
host_idCloud-provider specified or user specified Identifier of a node
hostnameHostname where the container ran
nodenameNodename where the container ran
labelsComma-separated(Default) list of user-provided labels. Format is 'key:value'
namespace_idUID of the namespace of a Pod
namespace_nameUser-provided name of a Namespace
resource_idA unique identifier used to differentiate multiple metrics of the same type. e.x. Fs partitions under filesystem/usage, disk device name under disk/io_read_bytes
makeMake of the accelerator (nvidia, amd, google etc.)
modelModel of the accelerator (tesla-p100, tesla-k80 etc.)
accelerator_idID of the accelerator

Note

$limit = avg(influx("k8s", '''SELECT mean(value) as value FROM "memory/limit" WHERE type = 'node' GROUP BY nodename, labels''', "${INTERVAL}s", "", ""))

With a comma-separated labels:

nodename=127.0.0.1,labels=beta.kubernetes.io/arch:amd64,beta.kubernetes.io/os:linux,kubernetes.io/hostname:127.0.0.1

When split by a comma, something wrong happened. Bosun split it wrongly to:

nodename=127.0.0.1
labels=labels:beta.kubernetes.io/arch:amd64
beta.kubernetes.io/os.linux
kubernetes.io/hostname:127.0.0.1

Last two tag key-value pairs is wrong. They should not exist and be squashed to labels:

nodename=127.0.0.1
labels=labels:beta.kubernetes.io/arch:amd64,beta.kubernetes.io/os.linux,kubernetes.io/hostname:127.0.0.1

This will make bosun confused and panic with something like "panic: opentsdb: bad tag: beta.kubernetes.io/os:linux".

  • User-provided labels can be stored additionally as separate labels with Heapster --store-label. Similarily, using --ignore-label, labels can be ommited in concatenated labels.

Aggregates

The metrics are initially collected for nodes and containers and later aggregated for pods, namespaces and clusters. Disk and network metrics are not available at container level (only at pod and node level).

Storage Schema

InfluxDB

Default

Each metric translates to a separate 'series' in InfluxDB. Labels are stored as tags. The metric name is not modified.

Using fields

If you want to use InfluxDB fields, you have to add withfields=true as parameter in InfluxDB sink URL. (More information here: https://docs.influxdata.com/influxdb/v0.9/concepts/key_concepts/)

In that case, each metric translates to a separate in 'series' in InfluxDB. This means that some metrics are grouped in the same 'measurement'. For example, we have the measurement 'cpu' with fields 'node_reservation', 'node_utilization', 'request', 'usage', 'usage_rate'. Also, all labels are stored as tags. Here the measurement list: cpu, filesystem, memory, network, uptime

Also, standard Grafana dashboard is not working with this new schema, you have to use new dashboards

Google Cloud Monitoring

Metrics mentioned above are stored along with corresponding labels as custom metrics in Google Cloud Monitoring.

  • Metrics are collected every 2 minutes by default and pushed with a 1 minute precision.

  • Each metric has a custom metric prefix - custom.cloudmonitoring.googleapis.com

  • Each metric is pushed with an additional namespace prefix - kubernetes.io.

  • GCM does not support visualizing cumulative metrics yet. To work around that, heapster exports an equivalent gauge metric for all cumulative metrics mentioned above.

    The gauge metrics use their parent cumulative metric name as the prefix, followed by a "_rate" suffix. E.x.: "cpu/usage", which is cumulative, will have a corresponding gauge metric "cpu/usage_rate" NOTE: The gauge metrics will be deprecated as soon as GCM supports visualizing cumulative metrics.

TODO: Add a snapshot of all the metrics stored in GCM.

Hawkular

Each metric is stored as separate timeseries (metric) in Hawkular-Metrics with tags being inherited from common ancestor type. The metric name is created with the following format: containerName/podId/metricName (/ is separator). Each definition stores the labels as tags with following addons:

  • All the Label descriptions are stored as label_description
  • The ancestor metric name (such as cpu/usage) is stored under the tag descriptor_name
  • To ease search, a tag with group_id stores the key containerName/metricName so each podId can be linked under a single timeseries if necessary.
  • Units are stored under units tag
  • If labelToTenant parameter is given, any metric with the label will use this label's value as the target tenant. If the metric doesn't have the label defined, default tenant is used.

At the start, all the definitions are fetched from the Hawkular-Metrics tenant and filtered to cache only the Heapster metrics. It is recommended to use a separate tenant for Heapster information if you have lots of metrics from other systems, but not required.

The Hawkular-Metrics instance can be a standalone installation of Hawkular-Metrics or the full installation of Hawkular.

k8s学习 踩坑之 top nodes - k8s Metrics not available for pod 报错 最近一直在弄k8s,前面安装都要顺畅,包括K8S集群等等。 k8s有个很重要的功能,就是它可以根据你服务器的压力动态扩容pod。 比如你可以预定你的pod实例是5个,当请求高峰过来的时候,pod压力过大,每个pod的cpu或者内容一下增大 当pod的cpu超过一个阈值的时候,k8s可以根据你的设定将pod实例变成8个,10个,设置20个, 过段时间,当洪峰过去,cup压力下来后,pod实例又会慢慢的将个数变成10个,8个,最后3个。 这个就是K8S的所谓的动态伸缩 但是要弄这个功能,最主要. 阅读详情

相关推荐

k8s核心指标API Metrics-Server部署指南!

Heapster是容器集群监控和性能分析工具,HPA、Dashborad、Kubectl top都依赖于heapster收集的数据。 但是Heapster从kubernetes 1.8以后已经被遗弃了...... 被metrics-server所替代......

k8s基础学习--metrics和hespster监控部署

最近在K8S上部署监控工具Heapster和Metrics遇到一些问题。pod启动之后显示: [root@MASTER ~]# kubectl top nodeError from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io)...

weixin_30537391的博客 228

Arm Neoverse CMN-700 SLC内存系统与缓存分区技术解析

现代处理器架构中,缓存一致性协议与内存子系统设计直接影响系统性能。Arm Neoverse CMN-700采用的SLC(System Level Cache)通过16-way组相联设计实现高效数据缓存,其物理地址索引机制支持灵活的way分区配置。在软件可配置内存(OCM)模式下,SLC可作为独立内存空间使用,通过寄存器控制实现模式切换与区域锁定。缓存分区技术则通过请求源分类和way-based分配策略,满足实时性任务与吞吐量场景的不同需求。这些技术在5G基站、边缘计算等低延迟场景中具有重要应用价值,特别是C

weixin_30263073的博客 618

error: Metrics not available for pod default....

描述:在安装完k8s 集群之后,发现 kubectl top nodes 无法查看cpu 资源使用情况 原因解析:未安装metrics-server 参考以下安装地址 ,成功安装即可 https://blog.youkuaiyun.com/oyym_mv/article/details/87166639

weixin_42269089的博客 1662

Selenium ChromeDriver反爬与性能优化实战指南

ChromeDriver作为Selenium的核心驱动,本质是浏览器自动化执行引擎,其默认行为会暴露大量JS运行时指纹(如navigator.webdriver、window.chrome),极易被前端反爬系统识别;同时因进程管理粗放、渲染等待机制僵化,导致内存泄漏、僵尸进程和高并发下稳定性崩塌。本文围绕真实生产场景,系统解析浏览器指纹伪造原理、进程级资源管控策略、基于页面状态的智能等待范式,并提供Docker容器化、K8s弹性扩缩与Prometheus可观测性落地路径,助力开发者将ChromeDriver

weixin_29762151的博客 1259

2022年电赛F题23年电赛D题-信号调制度测量装置说明中提到带通采样定律。

另外,当对于一个频率很高的射频信号采样时,如果采样频率设的太低,对提高采样量化的信噪比是不利的。低通采样定理在《信号与系统》教材中进行了详细的讨论,但未对带通信号的采样定理进行描述,国内樊昌信和曹丽娜老师编写的《通信原理》第10章第2小节有所描述,但没有详细的公式推导,容易给初学者产生超过该最低采样频率即不会产生频谱混叠的假象。故采样频率没选好,就会使周期性频谱搬移过程中造成频谱混叠,既然频谱和原信号的频谱对不上了,故就无法无失真恢复原信号了,总之,频域波形不出现重叠是无失真传输的重要保障。

qq_64919823的博客 2183

执行kubect top查看容器资源时报错

解决kubectl top报错:Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)

Ethin_l的博客 1957

EFR32无线SoC开发指南:从环境搭建到性能优化

物联网边缘设备开发中,无线SoC芯片的选择与开发环境配置是关键第一步。EFR32作为Silicon Labs推出的多协议无线SoC系列,配合Simplicity Studio IDE,为开发者提供了完整的解决方案。本文以EFR32xG22开发套件为例,详细介绍开发环境搭建、工程创建、硬件配置等核心环节,特别针对RAILtest示例工程进行深入解析。通过实际案例演示如何配置无线参数、优化低功耗模式,并分享串口终端交互、吞吐量测试等实战技巧。对于开发者常见的问题如设备识别失败、无线通信异常等,提供了系统化的排查

weixin_30342363的博客 352

一起来学k8s 07.安装metrics-server和heapster

Metrics-Server Kubernetes从1.8版本开始,CPU、内存等资源的metrics信息可以通过 Metrics API来获取,用户可以直接获取这些metrics信息 Metrics API 通过Metrics API我们可以获取到指定node或者pod的当前资源使用情况,API本身不存储任何信息,所以我们不可能通过API来获取资源的历史使用情况。 Metrics API的获取...

隔壁小翔 1415

从ACTF2020看文件上传漏洞:你以为改后缀就完事了?这些坑我都帮你踩过了

本文通过ACTF2020的Upload题目深入剖析文件上传漏洞的复杂性和防御策略。文章揭示了常见误区,如仅修改文件后缀的局限性,并详细解析了绕过技巧和高级防御机制。从开发角度提供了构建安全上传功能的实用建议,帮助读者全面理解文件上传漏洞的本质与防护方法。

weixin_29278805的博客 247

SAP BAPI调用避坑指南:处理MD61/MD62计划独立需求时,这些参数和返回值你必须检查

本文详细解析了SAP BAPI调用中处理MD61/MD62计划独立需求的关键参数和返回值检查要点,包括版本控制、日期类型和删除标记等核心参数设置,以及常见错误排查和高级调试技巧,帮助开发者高效管理需求计划数据。

weixin_30316097的博客 611

k8s api文档 调用heapster metrics

更多kubernetes文章:k8s专栏目录restful api访问k8s集群,增删改查信息,做界面二次开发。需要预先创建访问权限的配置。官网api文档https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/版本更新到v1.10以后 上面这个链接就找不到了 要把v1.9改成v1.10才能访问。https://kuber...

zhd930818的博客 2287

前沿探索:基于强化学习的目标检测与跟踪技术及论文解析

前沿探索:基于强化学习的目标检测与跟踪技术及论文解析 ,人工智能,计算机视觉,大模型,AI,本文聚焦基于强化学习的目标检测与跟踪技术,先介绍相关技术基础,包括目标检测、跟踪及强化学习的算法等。接着阐述强化学习在目标检测与跟踪中的应用思路、框架及典型算法,解析三篇相关论文的背景、方法、实验结果。还探讨了该技术面临的样本效率、奖励函数设计等挑战,以及结合迁移学习等的未来发展方向,为该领域研究提供参考。

不踩坑,不知道坑有多深;不总结,踩过的坑白踩。 11万+

Kubernetes监控数据集成Splunk Metrics Store:Heapster TCP方案实践

在云原生和容器化技术普及的背景下,基础设施监控与可观测性成为保障系统稳定运行的关键。时间序列指标作为监控数据的核心,记录了系统资源使用、应用性能等动态变化信息,其高效收集、存储与分析直接影响运维效率。StatsD作为一种轻量级指标收集协议,因其简单、低开销的特性,成为跨平台指标传输的常用桥梁。通过将StatsD协议与TCP可靠传输结合,可以构建高完整性的监控数据管道,有效避免UDP协议可能的数据丢失问题。这一技术方案特别适用于需要将异构监控数据统一汇聚到企业级分析平台的场景,能够实现基础设施监控与日志、事件

weixin_27573409的博客 534

手把手教你学simulink(44.1)--串励直流电动机场景示例:基于Simulink开发一个串励直流电动机电压控制仿真模型

高启动转矩:由于励磁绕组和电枢绕组串联连接,电机在启动时可以产生较大的转矩。速度随负载变化:由于励磁电流和电枢电流是同一电流,电机的速度会随着负载的变化而显著变化。适用于重载启动:适合用于需要高启动转矩的应用,如起重机、牵引系统等。

MHD0815的博客 340

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

kubernetes视频教程笔记 (35)-使用Helm部署metrics-server

从 Heapster 的 github <https://github.com/kubernetes/heapster >中可以看到已经,heapster 已经DEPRECATED。 这里是 heapster的deprecation timeline。 可以看出 heapster 从 Kubernetes 1.12 开始将从 Kubernetes 各种安装脚本中移除。 Kubernetes 推荐使用 metrics-server。我们这里也使用helm来部署metrics-server。

软件工程小施同学 的专栏 628

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

Kubernetes Heapster

Heapster是容器集群监控和性能分析工具,HPA、Dashborad、Kubectl top都依赖于heapster收集的数据。 但是Heapster从kubernetes 1.8以后已经被遗弃了...... 被metrics-server所替代...... kubernetes 1.11 中部署Heapster 1.5.4版本的过程 Heapster 部署yaml文件 apiVersi...

coco3848的博客 69

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

kubernetes 之部署metrics-server v0.3.1

Metrics-server简介 Metrics-server是用来替换heapster获取集群上资源指标数据的,heapster从1.11开始逐渐被废弃了。 在使用heapster时,获取资源指标是由heapster自已获取的,heapster有自已的获取路径,没有通过apiserver,后来k8s引入了资源指标API(Metrics API),于是资源指标的数据就从k8s的api中的...

大JAVA解决方案 737

kubernetes1.9部署metrics-server0.3.1、dashboard、heapster

简介 K8S从1.8版本开始,CPU、内存等资源的metrics信息可以通过 Metrics API来获取,用户可以直接获取这些metrics信息(例如通过执行kubect top命令),HPA使用这些metics信息来实现动态伸缩。本文介绍K8S集群基于metric server的HPA。在开始之前我们需要了解一下Metrics API和Metrics Server。 Metrics API: ...

qq_25934401的博客 1507

Kubernetes1.10.1 监控-heapster+influxdb+grafana

Heapster已弃用:Heapster已弃用。考虑使用 metrics-server 和第三方度量标准管道来代替收集Prometheus格式度量。有关 支持的更多信息,请参阅弃用时间表。我们不会为Heapster添加任何新功能 Heapster官方信息 如果已经弃用,就不再研究。 会转向Prometheus...

随笔记录-分享&记忆 1462

kubernetes 1.14安装部署metrics-server插件

简单介绍: 如果使用kubernetes的自动扩容功能的话,那首先得有一个插件,然后该插件将收集到的信息(cpu、memory..)与自动扩容的设置的值进行比对,自动调整pod数量。关于该插件,在kubernetes的早些版本中采用的是heapster,1.13版本正式发布后,丢弃了heapster,官方推荐采用metrics-sever。 测试环境: 部署的集群环境,如下: System...

artaganan8的博客 2485

Kubernetes监控方案:heapster+influxdb+grafana详解

1. 工具介绍 1.1 heapster Heapster是容器集群监控和性能分析工具,天然的支持Kubernetes和CoreOS。 Kubernetes有个出名的监控agent—cAdvisor。在每个kubernetes Node上都会运行cAdvisor,它会收集本机以及容器的监控数据(cpu,memory,filesystem,network,uptime)。在较新的版本中,K8S...

菲宇运维 1392

二十,Kubernetes_v1.14.2插件metrics-server

一,安装metrics-server metrics-server 通过 kube-apiserver 发现所有节点,然后调用 kubelet APIs(通过 https 接口)获得各节点(Node)和 Pod 的 CPU、Memory 等资源使用情况。 从 Kubernetes 1.12 开始,kubernetes 的安装脚本移除了 Heapster,从 1.13 开始完全移除了对 Heap...

Vv的博客 1113

揭秘Kubernetes的守护者:metrics-server如何让集群性能一目了然!(附实战指南与避坑大全)

metrics-server不是炫酷的新技术,它没有AI、没有区块链,甚至没有一行复杂的算法。但它像空气一样不可或缺——当你意识到它存在时,往往是因为已经窒息。没有可见性,就没有控制力。那些因metrics-server缺失导致的百万级损失,那些在故障中手忙脚乱的深夜,本质上都是对基础组件的傲慢。再智能的系统,也需要仪表盘。metrics-server就是Kubernetes的仪表盘,它不解决业务问题,但让解决业务问题成为可能。今天,立刻行动执行,检查你的集群是否“健康”。如果状态不是。

weixin_45631123的博客 1341

k8s的HeapSter和MetricServer监控模型

HeapSter介绍 用来统一收集和展示k8s集群中各个节点中cAdvisor上报的数据 HeapSter默认使用的是内存存储 无法持久化保存历史数据 需要单独安装InfluxDB来保存cAdvisor上报的数 kubelet中的cAdvisor插件负责收集各自主机和主机上运行Pod的资源数据 1.InfluxDB部署 ...

langyaxiaoxiao的专栏 118
上一篇: Kubernetes dashboard1.8.0 WebUI安装与配置
下一篇: IngressController的session stick问题
hxpjava1
博客等级 码龄19年 1365粉丝 511原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值