Blog Post

Tech Talk
2 MIN READ

Monitoring folders on Windows servers

PenYa's avatar
12 months ago

I was recently asked by a customer if it was possible to monitor the size of a folder or the file count in a folder on a Windows server.  Well there sure is, <whistles> YO UNC Monitor- come on down.

UNC Monitor- is part of the Core DS, the DSs that are installed by default when LogicMonitor is first deployed.  As seen on the UNC Monitor Description section:

Great, there is a way to do this.  Ok how do I do this?  Hmm?  Well looking at the next section of the DS, Technical Notes.

Add an instance manually, oooohh k.  But how do I perform this specific voodoo?  Hmm maybe if I look further down on the DS?  Ok there is the Groovy Script, what do I get when I run the Test Script? 

Ok so I do have 5 folders that contain 41 files using a total of 7,013 KB.  Great that’s some info but still not what I need for a path and I still don’t know how to “add the instance manually”

Maybe there is some documentation on how to do this?  Oh yeah it’s right here

Step 2 states “click the down arrow icon button located next to the manage button for that device.  From this dropdown menu, select “Add Other Monitoring” 

So now I know the steps I need to take and I know that there are folders that are shared.  How do I know what the shared folders are without having to log onto the server?  That’s where the debug facility comes in for help.  The easiest way to access debug is open any raw data screen and click on debug

You will be presented with all the available commands.  To assist in finding the available folder shared we will be using !wmi

If you aren’t familiar with any command just type the command and you will be presented with information.

In this case I want to show the shared folders on this server.  With a bit of knowledge on Win32 Classes we can find this info.  I’ll cover Win32 Classes in another post.  

Now I have everything I need to get this folder monitored through UNC, RIGHT?!?  RIGHT?!?

I’m looking at the device and there is no DS for UNC showing

How do I add it manually if I don’t have DS ugggh.  Since I have my handy dandy info from the documentation I know I need to:

Once you click on that you get

Add a name as you want it to show up on the instance list.  Then you can add a path from the list that was obtained through leveraging the debug facility.  Once both of those are filled in, hit save twice and tada you get

And more importantly you now  have alert tuning that you can perform on this specific UNC drive

Published 12 months ago
Version 1.0

2 Comments

  • This datasource has been a solution for us over the last year to send alerts to a dev team when the number of files or folders in a path increases beyond a threshold. We’ve used this to monitor that a service is running efficiently when it cleans up its own files after completing a cycle.