Monitoring Dude Mikrotik. Functions and scripts for simple

image



I saw a lot of instructions on dude from Mikrotik on the Internet, but I could not find information on how to write and use scripts and functions correctly. Now, having partially understood, I'm ready to share with you. There will not be a description of the installation and minimal dude setup, there are many detailed instructions for this. And also, I will not tell you why I use dude, this article is not for that. Forward.



I have a monitoring wall, not finished, there will be nine monitors. Let's finish it, I'll make a separate article.



image



I started collecting the cards I needed. In one of the instructions on dude, I saw that it is theoretically possible to organize monitoring of hard drives on servers using SNMP. In this example, we will parse the script.



This is the end result.



image


I will write in small pieces, but for those who “don’t damn it, where is the final result?” below are full monitoring scripts.



And so the logic is, we check for the presence of a disk by OID, if it exists, we get the amount, occupied space, calculate the free space and, if it is less than the specified one, we start to alarm.

Simple. And the easiest way to check the volume is to directly insert the check disk command to our server. Now our server looks like this.



image


You can insert a command by right-clicking on our server, select from the presented “Appearance”, in the open window we are interested in the “Label” field. Let's insert the command into it. For everything to work correctly, you need to put square brackets [] at the beginning and at the end of the command.



We use the following command [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]. At the output, we get this picture.



image


To put it simply, oid is a name assigned to some hardware by its type. If on absolutely correct then here - How to read MIB and OID .



With this sorted out. Now the figures obtained are the size of the disk in GB without rounding.

Now we need to add conditions. For Mikrotik it works like this: if (condition) = value, do it, otherwise do this. In our case, we write like this:



[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)]



We get such a string if oid = 0, that is, the disk is absent or empty, print 1, otherwise get the disk size. Instead of 1, there can be anything, but for the example you need this. Let's continue. The following code only adds round for rounding.



Code with added round
[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))]




image


Microtic uses concatenate to combine commands. The application is very unexpected, still not excel, but it turned out to work only with it. If someone succeeds in doing the same thing with a simpler code, write, it will be interesting to discuss. PS: just first read the result to the end, so that there is no misunderstanding.



Code with 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.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")))]





image


With this code, we have combined all the available information on disk memory. Volume / used / free in GB. It seems obvious, it seems clear, but what about the rest of the disks? Add a code for each disc? There can be a lot of disks, and we do not work for that, so that we can write everything with our hands every time. I've used functions. At first I ran into problems, when adding code in a row, you can add no more than 10 times in one function, we don't throw slippers, the microtic cycle is not familiar, unfortunately. Concatenation will save us. In the functions tab, create a new one, it looks like this:



Function to view disk space in real time
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

"))))))





The code is added to the function without square brackets. Thus, by adding one to oid, we will check all theoretically possible disks in the system. Here it should be clarified that the drive letters are written in a standard order, if you have the first drive letter W, then for this hardware you will have to do everything manually, or a separate function My_Funny_Computer. In the example, the beginning of the path, everyone will finish for themselves. Ok, let's check it out. We take the name of the created function, enclose it in square brackets, put round brackets at the end and add instead of the code to the Label tab. Example [About_PC ()]



image


image


Now we can watch and enjoy, but our task is different, to automate the process.

To do this, we need a function that will check disks and give information to the check probe. We make a function, I'll call Monitor_Disc_Serv its essence is this: if oid is not equal to 0, check the disk and if there is more than 50 GB of memory, return 1, otherwise 0.



Disk check function
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)





Ok, we got a function, let's process its value. Probes tab, create a new one it looks like this:



image


In the Type field, select Function, declaring that we will process the value received from the function.



Monitor_Disc_Serv () = 1 in the Available tab means that if the Monitor_Disc_Serv function returns 1, everything is fine.



Error is triggered if Available throws an error, i.e. always when its value is not equal to 1.

For the probe to work correctly, we write everything transparently and obviously: if (Monitor_Disc_Serv () = 1, "", "Something happened") if the function returns 1, then nothing needs to be done, otherwise display the line in alarm. Now further, for this to work, we need to add the configured probe to our server. To do this, open the settings, the Services tab and add a probe:



image


It has already worked for me, this is how the alarm configured for me looks like, you can put not 50GB, but as much as you need.



image


As a result, we have two functions. The first is for viewing disk space in real time and the second is for transmitting information to the probe. And also one probe.



Then you can attach SMS or mail notification, squeak, shouts of seagulls over the sea (did not check who will write it will be interesting). I think that something else can be added here, but the most basic thing is already there. Next, my guys and I plan to hang up the rest of the monitors, configure all screens for dude, and add Zabbix to some of these monitors. About the PC that pulled nine monitors, the cabinet for its assembly and what came of it in general, I'll tell you when we finish. While moving the server room, and I finished this article, I still remember something.



Good luck to all.



As promised.



Function to view disk space in real time
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

"))))))





Function for transferring to the probe
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)







Feature for 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

")))







Functions for network storage. In test mode, you need to check
Tequs
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