Go to All Forums

Monitor for number of files in the directory

We have a load of print servers in our estate, which sometimes error with a load of jobs stuck in the queues. There's very little to monitor for this error, until users call saying they can't print!

A check for a threshold breach of number of files in a specific dir would be really useful for this, and probably a bunch of other uses too.

Like (2) Reply
Replies (3)

Re: Monitor for number of files in the directory

Hi,

This can be done using our plugin integrations. To use one of our plugins, please ensure you have the latest version of the Linux server monitoring agent installed in your machine.

Once the agent is successfully installed, please follow the steps below:

1. Download and unzip the attachment (filecount.zip) in your server.

cd /opt/site24x7/monagent/plugins/

unzip filecount.zip

cd filecount

vi filecount.sh

2. Provide the DIRNAME as the name of the directory where you want to monitor the file count.

3. Once done, the plugin will be added and can be viewed in our web client. To view the metrics, go to Server > Plugins > filecount.sh

You can also configure alerts for the file count metric. To do that, hover on the hamburger icon beside the display name at the top of the page, click Edit. In the Edit Plugin Monitor page, click on the pencil icon beside Threshold and Availability. In the Edit Threshold page, configure thresholds for the file count metric and save your changes.

Hope this helps. For further clarifications, comment in the below thread.

Attachments
filecount.zip
Size: 0.85 KB
Like (0) Reply


Re: Re: Re: Monitor for number of files in the directory

Hi, 

To monitor folder and file count in Windows, please follow the steps below:

1. Download and unzip the attachment (FileCount.zip) in your server.
2. Unzip and open FileCount.ps1
3. Edit and update $directory with the path of the directory you want to monitor.
4. Create a folder with name FileCount under plugin directory (<installation path >\monitoring\Plugins\). Copy-paste the plugin script to the FileCount folder.

In the next data collection, the plugin will be added as a monitor in Site24x7 and its performance trends can be viewed in the web client under Server > Plugin Integrations.

Hope this helps. Let us know for further queries, if any, in the below thread.

 

Regards,

Hisham

Attachments
FileCount.zip
Size: 0.68 KB
Like (0) Reply

Was this post helpful?