监视Dude Mikrotik。简单的功能和脚本

图片



在Internet上,我从Mikrotik看到了很多关于dude的说明,但是我找不到有关如何正确编写和使用脚本和函数的信息。现在,我已经部分了解了,现在准备与您分享。没有安装说明和最小花花公子设置,对此有许多详细说明。而且,我不会告诉您为什么使用花花公子,本文不适合您。前锋。



我有一面监控墙,还没有完工,会有九个监控器。让我们完成它,我将另写一篇文章。



图片



我开始收集需要的卡片。在关于dude的说明之一中,我看到理论上可以使用SNMP组织对服务器上硬盘驱动器的监视。在此示例中,我们将解析脚本。



这是最终结果。



图片


我会写一些小片段,但对于那些“不该死的人,最终结果在哪里?”的人以下是完整的监视脚本。



因此逻辑是,我们通过OID检查磁盘是否存在,如果存在,则获取磁盘数量,已占用空间,计算可用空间,如果磁盘空间小于指定的可用空间,则开始发出警报。

简单。检查卷的最简单方法是直接将check disk命令插入我们的服务器。现在我们的服务器看起来像这样。



图片


您可以通过右键单击我们的服务器来插入命令,从显示的“外观”中选择,在打开的窗口中我们对“标签”字段感兴趣。让我们在其中插入命令。为了使一切正常运行,您需要在命令的开头和结尾处放置方括号[]。



我们使用以下命令[oid(“ 1.3.6.1.2.1.25.2.3.1.5.1”)* oid(“ 1.3.6.1.2.1.25.2.3.1.4.1” / 1024/1024/1024]。在输出中,我们得到了这张照片。



图片


简而言之,oid是通过其类型分配给某些硬件的名称。如果绝对正确,则在这里-如何读取MIB和OID



与此配合。现在获得的数字是磁盘大小(以GB为单位),没有四舍五入。

现在我们需要添加条件。对于Mikrotik,其工作方式如下:如果(condition)= value,则执行此操作,否则执行此操作。在我们的例子中,我们这样写:



[if(oid(“ 1.3.6.1.2.1.25.2.3.1.5.1”)= 0,“ 1”,oid(“ 1.3.6.1.2.1.25.2.3.1.5.1”)

* oid (“ 1.3.6.1.2.1.25.2.3.1.4.1” / 1024/1024/1024)]



如果oid = 0(即磁盘不存在或为空),则得到这样的字符串,打印1,否则得到磁盘大小。代替1,可以有任何东西,但是对于示例来说,您需要这样做。让我们继续。以下代码仅为舍入添加了舍入。



加上回合的代码
[if(oid("1.3.6.1.2.1.25.2.3.1.5.1")=0,"1",

round(oid("1.3.6.1.2.1.25.2.3.1.5.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1")/1024/1024/1024))]




图片


Microtic使用串联来组合命令。该应用程序非常出乎意料,仍然不是excel,但事实证明只能与它一起使用。如果有人用更简单的代码成功完成了相同的事情,请编写,进行讨论将很有趣。PS:只需先阅读结果就可以了,这样就不会产生误解。



带连接的代码
[if(oid("1.3.6.1.2.1.25.2.3.1.5.1")=0,"",

concatenate("C: ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1")/1024/1024/1024),"Gb"

," / ", round(oid("1.3.6.1.2.1.25.2.3.1.6.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1")/1024/1024/1024),"Gb ","/ ",

round(((((oid("1.3.6.1.2.1.25.2.3.1.5.1")-oid("1.3.6.1.2.1.25.2.3.1.6.1"))*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)/1024),"Gb")))]





图片


通过此代码,我们将磁盘存储器上的所有可用信息组合在一起。音量/已使用/免费(以GB为单位)。看起来很明显,看起来很清楚,但是其余磁盘呢?为每张光盘添加代码?可能有很多磁盘,因此我们不打算每次都用手来写所有磁盘。我已经使用过功能。刚开始我遇到问题,当连续添加代码时,一个函数最多可以添加10次,我们不会扔拖鞋,不幸的是,微循环并不熟悉。串联将拯救我们。在功能选项卡中,创建一个新的,如下所示:



实时查看磁盘空间的功能
concatenate(concatenate(concatenate(if(oid("1.3.6.1.2.1.25.2.3.1.5.1")=0,"",

concatenate("C: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.1")-oid("1.3.6.1.2.1.25.2.3.1.6.1"))*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.2")=0,"",

concatenate("D: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.2")-oid("1.3.6.1.2.1.25.2.3.1.6.2"))*oid("1.3.6.1.2.1.25.2.3.1.4.2"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.2")*oid("1.3.6.1.2.1.25.2.3.1.4.2")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.3")=0,"",

concatenate("E: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.3")-oid("1.3.6.1.2.1.25.2.3.1.6.3"))*oid("1.3.6.1.2.1.25.2.3.1.4.3"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.3")*oid("1.3.6.1.2.1.25.2.3.1.4.3")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.4")=0,"",

concatenate("F: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.4")-oid("1.3.6.1.2.1.25.2.3.1.6.4"))*oid("1.3.6.1.2.1.25.2.3.1.4.4"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.4")*oid("1.3.6.1.2.1.25.2.3.1.4.4")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.5")=0,"",

concatenate("G: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.5")-oid("1.3.6.1.2.1.25.2.3.1.6.5"))*oid("1.3.6.1.2.1.25.2.3.1.4.5"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.5")*oid("1.3.6.1.2.1.25.2.3.1.4.5")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.6")=0,"",

concatenate("H: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.6")-oid("1.3.6.1.2.1.25.2.3.1.6.6"))*oid("1.3.6.1.2.1.25.2.3.1.4.6"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.6")*oid("1.3.6.1.2.1.25.2.3.1.4.6")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.7")=0,"",

concatenate("I: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.7")-oid("1.3.6.1.2.1.25.2.3.1.6.7"))*oid("1.3.6.1.2.1.25.2.3.1.4.7"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.7")*oid("1.3.6.1.2.1.25.2.3.1.4.7")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.8")=0,"",

concatenate("G: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.8")-oid("1.3.6.1.2.1.25.2.3.1.6.8"))*oid("1.3.6.1.2.1.25.2.3.1.4.8"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.8")*oid("1.3.6.1.2.1.25.2.3.1.4.8")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.9")=0,"",

concatenate("J: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.9")-oid("1.3.6.1.2.1.25.2.3.1.6.9"))*oid("1.3.6.1.2.1.25.2.3.1.4.9"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.9")*oid("1.3.6.1.2.1.25.2.3.1.4.9")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.10")=0,"",

concatenate("K: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.10")-oid("1.3.6.1.2.1.25.2.3.1.6.10"))*oid("1.3.6.1.2.1.25.2.3.1.4.10"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.10")*oid("1.3.6.1.2.1.25.2.3.1.4.10")/1024/1024/1024),"Gb

")))),

(concatenate(if(oid("1.3.6.1.2.1.25.2.3.1.5.11")=0,"",

concatenate("C: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.11")-oid("1.3.6.1.2.1.25.2.3.1.6.11"))*oid("1.3.6.1.2.1.25.2.3.1.4.11"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.11")*oid("1.3.6.1.2.1.25.2.3.1.4.11")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.12")=0,"",

concatenate("D: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.12")-oid("1.3.6.1.2.1.25.2.3.1.6.12"))*oid("1.3.6.1.2.1.25.2.3.1.4.12"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.12")*oid("1.3.6.1.2.1.25.2.3.1.4.12")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.13")=0,"",

concatenate("E: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.13")-oid("1.3.6.1.2.1.25.2.3.1.6.13"))*oid("1.3.6.1.2.1.25.2.3.1.4.13"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.13")*oid("1.3.6.1.2.1.25.2.3.1.4.13")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.14")=0,"",

concatenate("F: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.14")-oid("1.3.6.1.2.1.25.2.3.1.6.14"))*oid("1.3.6.1.2.1.25.2.3.1.4.14"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.14")*oid("1.3.6.1.2.1.25.2.3.1.4.14")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.15")=0,"",

concatenate("G: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.15")-oid("1.3.6.1.2.1.25.2.3.1.6.15"))*oid("1.3.6.1.2.1.25.2.3.1.4.15"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.15")*oid("1.3.6.1.2.1.25.2.3.1.4.15")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.16")=0,"",

concatenate("H: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.16")-oid("1.3.6.1.2.1.25.2.3.1.6.16"))*oid("1.3.6.1.2.1.25.2.3.1.4.16"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.16")*oid("1.3.6.1.2.1.25.2.3.1.4.16")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.17")=0,"",

concatenate("I: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.17")-oid("1.3.6.1.2.1.25.2.3.1.6.17"))*oid("1.3.6.1.2.1.25.2.3.1.4.17"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.17")*oid("1.3.6.1.2.1.25.2.3.1.4.17")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.18")=0,"",

concatenate("G: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.18")-oid("1.3.6.1.2.1.25.2.3.1.6.18"))*oid("1.3.6.1.2.1.25.2.3.1.4.18"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.18")*oid("1.3.6.1.2.1.25.2.3.1.4.18")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.19")=0,"",

concatenate("J: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.19")-oid("1.3.6.1.2.1.25.2.3.1.6.19"))*oid("1.3.6.1.2.1.25.2.3.1.4.19"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.19")*oid("1.3.6.1.2.1.25.2.3.1.4.19")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.20")=0,"",

concatenate("K: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.20")-oid("1.3.6.1.2.1.25.2.3.1.6.20"))*oid("1.3.6.1.2.1.25.2.3.1.4.20"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.20")*oid("1.3.6.1.2.1.25.2.3.1.4.20")/1024/1024/1024),"Gb

")))))),

(concatenate(if(oid("1.3.6.1.2.1.25.2.3.1.5.21")=0,"",

concatenate("W: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.21")-oid("1.3.6.1.2.1.25.2.3.1.6.21"))*oid("1.3.6.1.2.1.25.2.3.1.4.21"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.21")*oid("1.3.6.1.2.1.25.2.3.1.4.21")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.22")=0,"",

concatenate("X: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.22")-oid("1.3.6.1.2.1.25.2.3.1.6.22"))*oid("1.3.6.1.2.1.25.2.3.1.4.22"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.22")*oid("1.3.6.1.2.1.25.2.3.1.4.22")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.23")=0,"",

concatenate("Y: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.23")-oid("1.3.6.1.2.1.25.2.3.1.6.23"))*oid("1.3.6.1.2.1.25.2.3.1.4.23"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.23")*oid("1.3.6.1.2.1.25.2.3.1.4.23")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.24")=0,"",

concatenate("Z: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.24")-oid("1.3.6.1.2.1.25.2.3.1.6.24"))*oid("1.3.6.1.2.1.25.2.3.1.4.24"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.24")*oid("1.3.6.1.2.1.25.2.3.1.4.24")/1024/1024/1024),"Gb

"))))))





该代码将添加到不带方括号的函数中。因此,通过向oid加1,我们将检查系统中所有理论上可能的磁盘。在这里应该澄清的是,驱动器号是按标准顺序编写的,如果您有第一个驱动器号W,则对于此硬件,您将必须手动执行所有操作,或使用单独的函数My_Funny_Computer。在示例中,道路的起点,每个人都将自己完成。好的,让我们检查一下。我们使用已创建函数的名称,将其括在方括号中,将圆括号放在末尾,然后将代替代码的代码添加到Label选项卡中。范例[About_PC()]



图片


图片


现在我们可以观看和享受,但我们的任务有所不同,以使过程自动化。

为此,我们需要一个功能来检查磁盘并将信息提供给检查探针。我们创建一个函数,我将其称为Monitor_Disc_Serv,其本质是这样的:如果oid不等于0,则检查磁盘,并且如果内存大于50 GB,则返回1,否则返回0。



磁盘检查功能
if(oid("1.3.6.1.2.1.25.2.3.1.5.1")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.1")-oid("1.3.6.1.2.1.25.2.3.1.6.1"))*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.2")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.2")-oid("1.3.6.1.2.1.25.2.3.1.6.2"))*oid("1.3.6.1.2.1.25.2.3.1.4.2"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.3")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.3")-oid("1.3.6.1.2.1.25.2.3.1.6.3"))*oid("1.3.6.1.2.1.25.2.3.1.4.3"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.4")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.4")-oid("1.3.6.1.2.1.25.2.3.1.6.4"))*oid("1.3.6.1.2.1.25.2.3.1.4.4"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.5")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.5")-oid("1.3.6.1.2.1.25.2.3.1.6.5"))*oid("1.3.6.1.2.1.25.2.3.1.4.5"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.6")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.6")-oid("1.3.6.1.2.1.25.2.3.1.6.6"))*oid("1.3.6.1.2.1.25.2.3.1.4.6"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.7")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.7")-oid("1.3.6.1.2.1.25.2.3.1.6.7"))*oid("1.3.6.1.2.1.25.2.3.1.4.7"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.8")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.8")-oid("1.3.6.1.2.1.25.2.3.1.6.8"))*oid("1.3.6.1.2.1.25.2.3.1.4.8"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.9")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.9")-oid("1.3.6.1.2.1.25.2.3.1.6.9"))*oid("1.3.6.1.2.1.25.2.3.1.4.9"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.10")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.10")-oid("1.3.6.1.2.1.25.2.3.1.6.10"))*oid("1.3.6.1.2.1.25.2.3.1.4.10"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.11")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.11")-oid("1.3.6.1.2.1.25.2.3.1.6.11"))*oid("1.3.6.1.2.1.25.2.3.1.4.11"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.12")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.12")-oid("1.3.6.1.2.1.25.2.3.1.6.12"))*oid("1.3.6.1.2.1.25.2.3.1.4.12"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.13")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.13")-oid("1.3.6.1.2.1.25.2.3.1.6.13"))*oid("1.3.6.1.2.1.25.2.3.1.4.13"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.14")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.14")-oid("1.3.6.1.2.1.25.2.3.1.6.14"))*oid("1.3.6.1.2.1.25.2.3.1.4.14"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.15")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.15")-oid("1.3.6.1.2.1.25.2.3.1.6.15"))*oid("1.3.6.1.2.1.25.2.3.1.4.15"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.16")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.16")-oid("1.3.6.1.2.1.25.2.3.1.6.16"))*oid("1.3.6.1.2.1.25.2.3.1.4.16"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.17")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.17")-oid("1.3.6.1.2.1.25.2.3.1.6.17"))*oid("1.3.6.1.2.1.25.2.3.1.4.17"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.18")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.18")-oid("1.3.6.1.2.1.25.2.3.1.6.18"))*oid("1.3.6.1.2.1.25.2.3.1.4.18"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.19")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.19")-oid("1.3.6.1.2.1.25.2.3.1.6.19"))*oid("1.3.6.1.2.1.25.2.3.1.4.19"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.20")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.20")-oid("1.3.6.1.2.1.25.2.3.1.6.20"))*oid("1.3.6.1.2.1.25.2.3.1.4.20"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.21")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.21")-oid("1.3.6.1.2.1.25.2.3.1.6.21"))*oid("1.3.6.1.2.1.25.2.3.1.4.21"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.22")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.22")-oid("1.3.6.1.2.1.25.2.3.1.6.22"))*oid("1.3.6.1.2.1.25.2.3.1.4.22"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.23")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.23")-oid("1.3.6.1.2.1.25.2.3.1.6.23"))*oid("1.3.6.1.2.1.25.2.3.1.4.23"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.24")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.24")-oid("1.3.6.1.2.1.25.2.3.1.6.24"))*oid("1.3.6.1.2.1.25.2.3.1.4.24"))/1024)/1024)/1024)>50,1,0),1)





好的,我们有一个函数,让我们处理它的值。探针选项卡,创建一个新的,看起来像这样:



图片


在类型字段中,选择函数,声明我们将处理从函数接收的值。



可用选项卡中的Monitor_Disc_Serv()= 1表示如果Monitor_Disc_Serv函数返回1,则一切正常。



如果Available引发错误,即触发错误 总是在其值不等于1时运行。

为了使探针正常工作,我们透明且明显地编写了所有内容:如果(Monitor_Disc_Serv()= 1,“”,“发生了什么事情”)如果函数返回1,则无需执行任何操作,否则显示该行报警。现在,为了使其更有效,我们需要将已配置的探针添加到我们的服务器。为此,请打开设置,“服务”选项卡并添加探针:



图片


它已经为我工作了,这就是为我配置的警报的样子,您不能放置50GB,但可以根据需要放置。



图片


结果,我们有两个功能。第一个用于实时查看磁盘空间,第二个用于将信息传输到探针。还有一个探针。



然后,您可以附加SMS或邮件通知,吱吱声,在海中呼喊海鸥(我没有检查谁会写它会很有趣)。我认为可以在此处添加其他内容,但是最基本的内容已经存在。接下来,我和我计划挂断其余显示器,为花花公子配置所有屏幕,并将Zabbix添加到其中一些显示器。关于拉下九台显示器的PC,组装用的机柜以及它的一般用途,我将在完成时告诉您。在移动服务器机房时,我完成了本文,但我仍然记得一些东西。



祝你们好运。



按照承诺。



实时查看磁盘空间的功能
concatenate(concatenate(concatenate(if(oid("1.3.6.1.2.1.25.2.3.1.5.1")=0,"",

concatenate("C: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.1")-oid("1.3.6.1.2.1.25.2.3.1.6.1"))*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.2")=0,"",

concatenate("D: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.2")-oid("1.3.6.1.2.1.25.2.3.1.6.2"))*oid("1.3.6.1.2.1.25.2.3.1.4.2"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.2")*oid("1.3.6.1.2.1.25.2.3.1.4.2")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.3")=0,"",

concatenate("E: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.3")-oid("1.3.6.1.2.1.25.2.3.1.6.3"))*oid("1.3.6.1.2.1.25.2.3.1.4.3"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.3")*oid("1.3.6.1.2.1.25.2.3.1.4.3")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.4")=0,"",

concatenate("F: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.4")-oid("1.3.6.1.2.1.25.2.3.1.6.4"))*oid("1.3.6.1.2.1.25.2.3.1.4.4"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.4")*oid("1.3.6.1.2.1.25.2.3.1.4.4")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.5")=0,"",

concatenate("G: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.5")-oid("1.3.6.1.2.1.25.2.3.1.6.5"))*oid("1.3.6.1.2.1.25.2.3.1.4.5"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.5")*oid("1.3.6.1.2.1.25.2.3.1.4.5")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.6")=0,"",

concatenate("H: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.6")-oid("1.3.6.1.2.1.25.2.3.1.6.6"))*oid("1.3.6.1.2.1.25.2.3.1.4.6"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.6")*oid("1.3.6.1.2.1.25.2.3.1.4.6")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.7")=0,"",

concatenate("I: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.7")-oid("1.3.6.1.2.1.25.2.3.1.6.7"))*oid("1.3.6.1.2.1.25.2.3.1.4.7"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.7")*oid("1.3.6.1.2.1.25.2.3.1.4.7")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.8")=0,"",

concatenate("G: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.8")-oid("1.3.6.1.2.1.25.2.3.1.6.8"))*oid("1.3.6.1.2.1.25.2.3.1.4.8"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.8")*oid("1.3.6.1.2.1.25.2.3.1.4.8")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.9")=0,"",

concatenate("J: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.9")-oid("1.3.6.1.2.1.25.2.3.1.6.9"))*oid("1.3.6.1.2.1.25.2.3.1.4.9"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.9")*oid("1.3.6.1.2.1.25.2.3.1.4.9")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.10")=0,"",

concatenate("K: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.10")-oid("1.3.6.1.2.1.25.2.3.1.6.10"))*oid("1.3.6.1.2.1.25.2.3.1.4.10"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.10")*oid("1.3.6.1.2.1.25.2.3.1.4.10")/1024/1024/1024),"Gb

")))),

(concatenate(if(oid("1.3.6.1.2.1.25.2.3.1.5.11")=0,"",

concatenate("C: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.11")-oid("1.3.6.1.2.1.25.2.3.1.6.11"))*oid("1.3.6.1.2.1.25.2.3.1.4.11"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.11")*oid("1.3.6.1.2.1.25.2.3.1.4.11")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.12")=0,"",

concatenate("D: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.12")-oid("1.3.6.1.2.1.25.2.3.1.6.12"))*oid("1.3.6.1.2.1.25.2.3.1.4.12"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.12")*oid("1.3.6.1.2.1.25.2.3.1.4.12")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.13")=0,"",

concatenate("E: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.13")-oid("1.3.6.1.2.1.25.2.3.1.6.13"))*oid("1.3.6.1.2.1.25.2.3.1.4.13"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.13")*oid("1.3.6.1.2.1.25.2.3.1.4.13")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.14")=0,"",

concatenate("F: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.14")-oid("1.3.6.1.2.1.25.2.3.1.6.14"))*oid("1.3.6.1.2.1.25.2.3.1.4.14"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.14")*oid("1.3.6.1.2.1.25.2.3.1.4.14")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.15")=0,"",

concatenate("G: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.15")-oid("1.3.6.1.2.1.25.2.3.1.6.15"))*oid("1.3.6.1.2.1.25.2.3.1.4.15"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.15")*oid("1.3.6.1.2.1.25.2.3.1.4.15")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.16")=0,"",

concatenate("H: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.16")-oid("1.3.6.1.2.1.25.2.3.1.6.16"))*oid("1.3.6.1.2.1.25.2.3.1.4.16"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.16")*oid("1.3.6.1.2.1.25.2.3.1.4.16")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.17")=0,"",

concatenate("I: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.17")-oid("1.3.6.1.2.1.25.2.3.1.6.17"))*oid("1.3.6.1.2.1.25.2.3.1.4.17"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.17")*oid("1.3.6.1.2.1.25.2.3.1.4.17")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.18")=0,"",

concatenate("G: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.18")-oid("1.3.6.1.2.1.25.2.3.1.6.18"))*oid("1.3.6.1.2.1.25.2.3.1.4.18"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.18")*oid("1.3.6.1.2.1.25.2.3.1.4.18")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.19")=0,"",

concatenate("J: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.19")-oid("1.3.6.1.2.1.25.2.3.1.6.19"))*oid("1.3.6.1.2.1.25.2.3.1.4.19"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.19")*oid("1.3.6.1.2.1.25.2.3.1.4.19")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.20")=0,"",

concatenate("K: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.20")-oid("1.3.6.1.2.1.25.2.3.1.6.20"))*oid("1.3.6.1.2.1.25.2.3.1.4.20"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.20")*oid("1.3.6.1.2.1.25.2.3.1.4.20")/1024/1024/1024),"Gb

")))))),

(concatenate(if(oid("1.3.6.1.2.1.25.2.3.1.5.21")=0,"",

concatenate("W: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.21")-oid("1.3.6.1.2.1.25.2.3.1.6.21"))*oid("1.3.6.1.2.1.25.2.3.1.4.21"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.21")*oid("1.3.6.1.2.1.25.2.3.1.4.21")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.22")=0,"",

concatenate("X: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.22")-oid("1.3.6.1.2.1.25.2.3.1.6.22"))*oid("1.3.6.1.2.1.25.2.3.1.4.22"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.22")*oid("1.3.6.1.2.1.25.2.3.1.4.22")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.23")=0,"",

concatenate("Y: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.23")-oid("1.3.6.1.2.1.25.2.3.1.6.23"))*oid("1.3.6.1.2.1.25.2.3.1.4.23"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.23")*oid("1.3.6.1.2.1.25.2.3.1.4.23")/1024/1024/1024),"Gb

"))),

if(oid("1.3.6.1.2.1.25.2.3.1.5.24")=0,"",

concatenate("Z: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.24")-oid("1.3.6.1.2.1.25.2.3.1.6.24"))*oid("1.3.6.1.2.1.25.2.3.1.4.24"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.24")*oid("1.3.6.1.2.1.25.2.3.1.4.24")/1024/1024/1024),"Gb

"))))))





转移到探针的功能
if(oid("1.3.6.1.2.1.25.2.3.1.5.1")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.1")-oid("1.3.6.1.2.1.25.2.3.1.6.1"))*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.2")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.2")-oid("1.3.6.1.2.1.25.2.3.1.6.2"))*oid("1.3.6.1.2.1.25.2.3.1.4.2"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.3")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.3")-oid("1.3.6.1.2.1.25.2.3.1.6.3"))*oid("1.3.6.1.2.1.25.2.3.1.4.3"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.4")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.4")-oid("1.3.6.1.2.1.25.2.3.1.6.4"))*oid("1.3.6.1.2.1.25.2.3.1.4.4"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.5")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.5")-oid("1.3.6.1.2.1.25.2.3.1.6.5"))*oid("1.3.6.1.2.1.25.2.3.1.4.5"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.6")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.6")-oid("1.3.6.1.2.1.25.2.3.1.6.6"))*oid("1.3.6.1.2.1.25.2.3.1.4.6"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.7")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.7")-oid("1.3.6.1.2.1.25.2.3.1.6.7"))*oid("1.3.6.1.2.1.25.2.3.1.4.7"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.8")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.8")-oid("1.3.6.1.2.1.25.2.3.1.6.8"))*oid("1.3.6.1.2.1.25.2.3.1.4.8"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.9")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.9")-oid("1.3.6.1.2.1.25.2.3.1.6.9"))*oid("1.3.6.1.2.1.25.2.3.1.4.9"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.10")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.10")-oid("1.3.6.1.2.1.25.2.3.1.6.10"))*oid("1.3.6.1.2.1.25.2.3.1.4.10"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.11")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.11")-oid("1.3.6.1.2.1.25.2.3.1.6.11"))*oid("1.3.6.1.2.1.25.2.3.1.4.11"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.12")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.12")-oid("1.3.6.1.2.1.25.2.3.1.6.12"))*oid("1.3.6.1.2.1.25.2.3.1.4.12"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.13")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.13")-oid("1.3.6.1.2.1.25.2.3.1.6.13"))*oid("1.3.6.1.2.1.25.2.3.1.4.13"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.14")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.14")-oid("1.3.6.1.2.1.25.2.3.1.6.14"))*oid("1.3.6.1.2.1.25.2.3.1.4.14"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.15")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.15")-oid("1.3.6.1.2.1.25.2.3.1.6.15"))*oid("1.3.6.1.2.1.25.2.3.1.4.15"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.16")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.16")-oid("1.3.6.1.2.1.25.2.3.1.6.16"))*oid("1.3.6.1.2.1.25.2.3.1.4.16"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.17")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.17")-oid("1.3.6.1.2.1.25.2.3.1.6.17"))*oid("1.3.6.1.2.1.25.2.3.1.4.17"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.18")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.18")-oid("1.3.6.1.2.1.25.2.3.1.6.18"))*oid("1.3.6.1.2.1.25.2.3.1.4.18"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.19")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.19")-oid("1.3.6.1.2.1.25.2.3.1.6.19"))*oid("1.3.6.1.2.1.25.2.3.1.4.19"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.20")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.20")-oid("1.3.6.1.2.1.25.2.3.1.6.20"))*oid("1.3.6.1.2.1.25.2.3.1.4.20"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.21")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.21")-oid("1.3.6.1.2.1.25.2.3.1.6.21"))*oid("1.3.6.1.2.1.25.2.3.1.4.21"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.22")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.22")-oid("1.3.6.1.2.1.25.2.3.1.6.22"))*oid("1.3.6.1.2.1.25.2.3.1.4.22"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.23")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.23")-oid("1.3.6.1.2.1.25.2.3.1.6.23"))*oid("1.3.6.1.2.1.25.2.3.1.4.23"))/1024)/1024)/1024)>50,1,0),1)*

if(oid("1.3.6.1.2.1.25.2.3.1.5.24")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.24")-oid("1.3.6.1.2.1.25.2.3.1.6.24"))*oid("1.3.6.1.2.1.25.2.3.1.4.24"))/1024)/1024)/1024)>50,1,0),1)







CentOS的功能
if(oid("1.3.6.1.2.1.25.2.3.1.5.31")=0,"",

concatenate("Disc: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.31")-oid("1.3.6.1.2.1.25.2.3.1.6.31"))*oid("1.3.6.1.2.1.25.2.3.1.4.31"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.31")*oid("1.3.6.1.2.1.25.2.3.1.4.31")/1024/1024/1024),"Gb

")))







网络存储功能。在测试模式下,您需要检查
特克斯
if(oid("1.3.6.1.2.1.25.2.3.1.5.46")=0,"",

concatenate("Disc: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.46")-oid("1.3.6.1.2.1.25.2.3.1.6.46"))*oid("1.3.6.1.2.1.25.2.3.1.4.46"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.46")*oid("1.3.6.1.2.1.25.2.3.1.4.46")/1024/1024/1024),"Gb

")))



if(oid("1.3.6.1.2.1.25.2.3.1.5.46")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.46")-oid("1.3.6.1.2.1.25.2.3.1.6.46"))*oid("1.3.6.1.2.1.25.2.3.1.4.46"))/1024)/1024)/1024)>10,1,0),1)





Qnap
if(oid("1.3.6.1.2.1.25.2.3.1.5.33")=0,"",

concatenate("Disc: ",round(((((oid("1.3.6.1.2.1.25.2.3.1.5.33")-oid("1.3.6.1.2.1.25.2.3.1.6.33"))*oid("1.3.6.1.2.1.25.2.3.1.4.33"))/1024)/1024)/1024),"Gb"

," / ",(round(oid("1.3.6.1.2.1.25.2.3.1.5.33")*oid("1.3.6.1.2.1.25.2.3.1.4.33")/1024/1024/1024),"Gb

")))



if(oid("1.3.6.1.2.1.25.2.3.1.5.33")<>0,if(round(((((oid("1.3.6.1.2.1.25.2.3.1.5.33")-oid("1.3.6.1.2.1.25.2.3.1.6.33"))*oid("1.3.6.1.2.1.25.2.3.1.4.33"))/1024)/1024)/1024)>10,1,0),1)












All Articles