获取磁盘和内存使用率(%) [英] Getting Disk and Memory usage (%)

查看:102
本文介绍了获取磁盘和内存使用率(%)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Azure Monitor作为数据源来设置Grafana,并尝试捕获一些简单的指标; cpu_percent,mem_percent和disk_percent。

I'm trying to setup Grafana at the moment, with Azure Monitor as a datasource, and trying to just capture a few simple metrics; cpu_percent, mem_percent and disk_percent.

虚拟机正在运行Ubuntu 16.04,并且附加了大约5个额外的磁盘。

The VM is running Ubuntu 16.04, and has about 5 extra disks attached to it.

在Azure门户中我已启用额外的诊断设置,但它似乎不喜欢启用"文件系统"设置。度量标准(在基本选项卡中)。

In the Azure Portal I have enabled the extra Diagnostics settings, however it doesn't seem to like enabling the "File System" Metric (in the Basic tab).

根据此SO问题(https://stackoverflow.com/questions/42853392/monitor-free-disk-space-on-azure-vm ),我应该能够编写自己的自定义指标,但是我不明白我是如何做到这一点的。

According to this SO question (https://stackoverflow.com/questions/42853392/monitor-free-disk-space-on-azure-vm), I should be able to write my own Custom metric, however I do not understand how I can do this.

如果有人能够对此有所了解,那将非常感激!

If anyone can shed any light on this that would be very much appreciated!

谢谢! 

推荐答案

您无法启用自定义指标的原因可能是:因为 

The reason you are unable to enable custom metrics could be because 


在公开预览期间,发布自定义指标的功能仅在Azure区域的子集中可用。此限制意味着只能为其中一个受支持的区域中的资源发布度量标准。下表列出了自定义指标支持的
Azure区域集。它还列出了相应的端点,这些区域中的资源指标应该发布到:

During the public preview, the ability to publish custom metrics is available only in a subset of Azure regions. This restriction means that metrics can be published only for resources in one of the supported regions. The following table lists the set of supported Azure regions for custom metrics. It also lists the corresponding endpoints that metrics for resources in those regions should be published to:

Azure region Regional endpoint prefix
East US https://eastus.monitoring.azure.com/
South Central US https://southcentralus.monitoring.azure.com/
West Central US https://westcentralus.monitoring.azure.com/
West US 2 https://westus2.monitoring.azure.com/
Southeast Asia https://southeastasia.monitoring.azure.com/
North Europe https://northeurope.monitoring.azure.com/
West Europe https://westeurope.monitoring.azure.com/


这篇关于获取磁盘和内存使用率(%)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆