Fixed module building - df_percent (windows)

This commit is contained in:
fbsanchez 2016-10-20 15:09:44 +02:00
parent 0cb22a9b8a
commit b614a460e9
1 changed files with 4 additions and 4 deletions

View File

@ -29,12 +29,13 @@ For Each objItem in colItems
Wscript.StdOut.WriteLine "<module>" Wscript.StdOut.WriteLine "<module>"
Wscript.StdOut.WriteLine " <name><![CDATA[DiskFree%_" & objItem.Name & "]]></name>" Wscript.StdOut.WriteLine " <name><![CDATA[DiskFree%_" & objItem.Name & "]]></name>"
Wscript.StdOut.WriteLine " <description><![CDATA[Drive " & objItem.Name & " % free space ]]></description>" Wscript.StdOut.WriteLine " <description><![CDATA[Drive " & objItem.Name & " % free space ]]></description>"
if (Percent > 99.99) then If (Percent > 99.99) then
Wscript.StdOut.WriteLine " <data><![CDATA[" & 100 & "]]></data>" Wscript.StdOut.WriteLine " <data><![CDATA[" & 100 & "]]></data>"
elseif (Percent < 0.01) then Elseif (Percent < 0.01) then
Wscript.StdOut.WriteLine " <data><![CDATA[" & 0 & "]]></data>" Wscript.StdOut.WriteLine " <data><![CDATA[" & 0 & "]]></data>"
else Else
Wscript.StdOut.WriteLine " <data><![CDATA[" & Percent & "]]></data>" Wscript.StdOut.WriteLine " <data><![CDATA[" & Percent & "]]></data>"
End If
Wscript.StdOut.WriteLine "<unit>%</unit>" Wscript.StdOut.WriteLine "<unit>%</unit>"
Wscript.StdOut.WriteLine "<min_warning>5</min_warning>" Wscript.StdOut.WriteLine "<min_warning>5</min_warning>"
Wscript.StdOut.WriteLine "<max_warning>10</max_warning>" Wscript.StdOut.WriteLine "<max_warning>10</max_warning>"
@ -42,7 +43,6 @@ For Each objItem in colItems
Wscript.StdOut.WriteLine "<max_critical>5</max_critical>" Wscript.StdOut.WriteLine "<max_critical>5</max_critical>"
Wscript.StdOut.WriteLine "</module>" Wscript.StdOut.WriteLine "</module>"
Wscript.StdOut.flush Wscript.StdOut.flush
End If
End If End If
End If End If