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 (1) Reply
Replies (1)

Re: Monitor for number of files in the directory


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.

Size: 0.85 KB
Like (0) Reply

Was this post helpful?