A bit a special Problem

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
jdommasc
Posts: 11
Joined: Tue May 31, 2005 3:21 am

A bit a special Problem

Post by jdommasc »

Dear all,
i have a little problem with cacti. Iam trying to count files in a shared directory. The directory is always full with tonns of files. My problem how can i do this with cacti. Ihave a vbs script but i think i will need a pearl.

Code: Select all

'Dim Variables
Set OBJfso = WScript.CreateObject("Scripting.FileSystemObject")

STRFolderSpec="\\ber-fax-002\reports"
intFiles=0
'assign folder to object
Set sourcedir = OBJfso.GetFolder(STRFolderSpec)
Set Files = sourcedir.Files



'Loop through  all Files
For Each flfile In Files
	intFiles=intFiles+1
Next

'Complete reading
I hope anybody has an Idea.
Iam using mysql 4; cacti 0.86g, on a windows 2003 iis 6.
Thanks

p.s. thanks withness for this great tool let's praise him together
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

From what I understand of the scripting engine, you just need to modify your vbs script to output the results in a standard way. See the documentation for more details on the format, or take a look at the example scripts in Cacti (and of course the other threads).

Also remember to setup the scheduled task with a user id that can access that directory.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests