Hello,

I have a software that works with file queue. In the nominal state, the number of file in a specific directory must be equal to zero. When a new request is submitted, a file is created, then deleted when the request has been proceeded.

Given this behavior, is it possible to do the following with PA Server Monitor: 1. Monitor than the amount of file in a given folder is not higher than a specified thresold 2. Monitor than the amount of file is not higher than 0 for more than a specified thresold

Regards.

Sylvain

asked 02 Sep '13, 05:53

sylbae's gravatar image

sylbae
231711
accept rate: 0%


Hi Sylvain,

Yes PA Server Monitor can monitor the number of files that are in a directory. The Execute Script Monitor would do that very easily. There are even some example scripts that you can use for your monitor.

Thanks
Quinn

Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.

link

answered 03 Sep '13, 09:07

Quinn's gravatar image

Quinn ♦♦
14.5k3925
accept rate: 35%

Hi Sylvain,

I use PA Monitor for this very purpose.. here is a sample VBScript that I use:

dim fso
    Set fso = CreateObject("Scripting.FileSystemObject")
    dim fold
    set fold = fso.GetFolder("\SERVER.DOMAIN.LOCAL\d$\DataUpload")

    if fold.Files.Count > 100 then
        SendNotification = True
        Details = "DataUpload file count > 100 (currently " & _
            fold.Files.Count & ")"
    else
        SendNotification = False
    end if

I hope this helps you.

link

answered 18 Oct '13, 15:14

Jeffg79's gravatar image

Jeffg79
111
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×46
×33

Asked: 02 Sep '13, 05:53

Seen: 6,854 times

Last updated: 18 Oct '13, 15:14