Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
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.
'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
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.