Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

  • Error en df_percent.vbs

    Posted by jfcarpi on April 3, 2014 at 15:08

    Hola,
    Ayer de repente empece a recibir eventos del tipo:
    Unable to process XML data file ‘/var/spool/pandora/data_in/VSOFI.23050.data’: miā€¦ine 59, column 2, byte 2341 at /usr/lib/perl5/XML/Parser.pm line 187 thread 1

    Obervando el fichero, encontramos en una parte lo siguiente:


    Ā  Ā 
    Ā  Ā 
    Ā  Ā 


    Ā  Ā 
    Ā  Ā 
    Ā  Ā 


    Ā  Ā 
    Ā  Ā 
    Ā  Ā 


    Ā  Ā 
    Ā  Ā 
    Ā  Ā 


    Ā  Ā 
    Ā  Ā 
    Ā  Ā 

    Ā  Ā 
    Ā  Ā 
    Ā  Ā 

    Vemos que en el disco I con valor 0 no acaba de formarse bien el xml, por ello veo el script df_percent.vbs
    y encontramos la siguiente parte de codigo:

    If (objItem.FreeSpace <> “”) AND (objItem.DriveType =3) Then
    Ā  Ā  Ā  Ā  Percent = round ((objItem.FreeSpace / objItem.Size) * 100, 2)
    Wscript.StdOut.WriteLine “
    Wscript.StdOut.WriteLine ”Ā  Ā 
    Wscript.StdOut.WriteLine ”Ā  Ā 
    if (Percent > 99.99) then
    Ā  Ā  Wscript.StdOut.WriteLine ”Ā  Ā 
    elseif (Percent < 0.01) then Ā  Ā  Wscript.StdOut.WriteLine "Ā  Ā 
    else
    Ā  Wscript.StdOut.WriteLine ”Ā  Ā 
    Ā  Wscript.StdOut.WriteLine “

    Ā  Wscript.StdOut.flush
    End If
    End If

    La correcion siguiente corrige el problema

    If (objItem.FreeSpace <> “”) AND (objItem.DriveType =3) Then
    Ā  Ā  Ā  Ā  Percent = round ((objItem.FreeSpace / objItem.Size) * 100, 2)
    Wscript.StdOut.WriteLine “
    Wscript.StdOut.WriteLine ”Ā  Ā 
    Wscript.StdOut.WriteLine ”Ā  Ā 
    if (Percent > 99.99) then
    Ā  Ā  Wscript.StdOut.WriteLine ”Ā  Ā 
    elseif (Percent < 0.01) then Ā  Ā  Wscript.StdOut.WriteLine "Ā  Ā 
    else
    Ā  Wscript.StdOut.WriteLine ”Ā  Ā 
    End If
    Wscript.StdOut.WriteLine “

    Wscript.StdOut.flush
    End If

    Un saludo

    ivo_yordanov replied 10 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • ivo_yordanov

    Member
    April 4, 2014 at 14:01
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hola

    Revisaremos el script y en caso de ser asi aplicaremos los cambios al codigo fuente.

    Gracias por vuestra aportaciĆ³n