Kaseya Community

How to Monitor for a Change in File Size

  • Does anybody know how to monitor a particular file for a change in file size? I swear this is possible, but I can't find where it is now in the Kaseya interface.

    Legacy Forum Name: How to Monitor for a Change in File Size,
    Legacy Posted By Username: lukem@thecomputerfactory.com
  • lukem@thecomputerfactory.com
    Does anybody know how to monitor a particular file for a change in file size? I swear this is possible, but I can't find where it is now in the Kaseya interface.


    I don't recall there being a monitor set for it, but a script should be able to take care of that...

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty
  • Ah, bummer. Okay. Well when I get the script working I'll post it here.

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: lukem@thecomputerfactory.com
  • lukem@thecomputerfactory.com
    Ah, bummer. Okay. Well when I get the script working I'll post it here.


    I have a scipt that monitors directory size the uses the log parcer to send an email when it's reached a specific size in bytes if you want that let me know I'll post it.

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty
  • thirteentwenty
    I have a scipt that monitors directory size the uses the log parcer to send an email when it's reached a specific size in bytes if you want that let me know I'll post it.


    I'd like to see that if you wouldn't mind posting it. Thanks!

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: kcears
  • Here's the script to create the file for checking

    <?xml version="1.0" encoding="utf-8"?>
    <ScriptExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.kaseya.com/vsa/2008/12/Scripting">
      <Procedure name="EXCH01 Log Size" treePres="3">
        <Body description="Checks total size of exchange logs">
          <If description="Checks total size of exchange logs">
            <Condition name="True" />
            <Then>
              <Statement name="WriteScriptLogEntry" continueOnFail="false">
                <Parameter xsi:type="StringParameter" name="Comment" value="Exchange Script started" />
              </Statement>
              <Statement name="ExecuteShellCommand" continueOnFail="false">
                <Parameter xsi:type="StringParameter" name="Command" value="dir &amp;#34;C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group&amp;#34; /-c | find &amp;#34;File(s)&amp;#34; &gt;&gt;#vAgentConfiguration.AgentTempDir#\logSize.txt" />
                <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
              </Statement>
              <Statement name="GetVariable" continueOnFail="false">
                <Parameter xsi:type="EnumParameter" name="VariableType" value="FileContent" />
                <Parameter xsi:type="StringParameter" name="SourceContent" value="#vAgentConfiguration.AgentTempDir#\logSize.txt" />
                <Parameter xsi:type="StringParameter" name="VariableName" value="logSize" />
              </Statement>
              <Statement name="WriteScriptLogEntry" continueOnFail="false">
                <Parameter xsi:type="StringParameter" name="Comment" value="Exchange log is - #logSize#" />
              </Statement>
            </Then>
          </If>
        </Body>
      </Procedure>
    </ScriptExport>
    
    I don't see a way to export the parser set so here it is in a nutshell Parser Name <whatEverYouNameIt> Log File Path <drive>:\Path\To\File.ext Log Archive Path (I have it blank) Description <insertWittyDescriptionHere> Template (Use the log file tester thing for this) $fileCount$ File(s) $byteCount$ bytes Output Template Total Files: $fileCount$ Total Size in Bytes: $byteCount$ $fileCOunt$ is an integer $byteCount$ is a Float

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty



    [edited by: Brendan Cosgrove at 5:25 PM (GMT -8) on 12-20-2010] .
  • How do I get this script in the monitoring?
    Can I import it?

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: ServicedeskDG
  • ServicedeskDG
    How do I get this script in the monitoring?
    Can I import it?


    Import it into your scripts, then setup a log parcer to do the rest.

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty
  • Well, this is interesting... I still need to programmatically acquire the location of the Exchange database files (they're all over the place across our client base, due to various factors such as who we inherited the client from) but this could rather neatly replace the old kludged Exchange DB Size test suite I cobbled together a while back.

    I'll have to play with this, I think.

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: GreyDuck
  • GreyDuck
    Well, this is interesting... I still need to programmatically acquire the location of the Exchange database files (they're all over the place across our client base, due to various factors such as who we inherited the client from) but this could rather neatly replace the old kludged Exchange DB Size test suite I cobbled together a while back.

    I'll have to play with this, I think.


    I hadn't thought about using this to monitor the Exchange DB sizes. I use it for exchange log files specificially

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty
  • thirteentwenty
    Import it into your scripts, then setup a log parcer to do the rest.


    When I import it to script I get a error that says:
    The IF statement l version="1.0" encoding="utf-8"?> is not valid

    There is someting wrong with the script.

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: ServicedeskDG
  • ServicedeskDG
    When I import it to script I get a error that says:
    The IF statement l version="1.0" encoding="utf-8"?> is not valid

    There is someting wrong with the script.


    What version of Kaseya are you running?

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty
  • thirteentwenty
    What version of Kaseya are you running?


    I'm running version 2008 (SP1) - 5.1.0.0

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: ServicedeskDG
  • ServicedeskDG
    I'm running version 2008 (SP1) - 5.1.0.0


    Well that explains it, it's a K2 script...

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty
  • Is there a K 5.1 script?

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: ServicedeskDG