I am almost positive it doesnt, I just ran the script with an output to a text file and it was just the number with no extra lines, tabs or spaces.
Ad Widget
Collapse
Count number files into a windows directory
Collapse
X
-
Ok, decided to go a different route. I am now running the VBscript as a scheduled task on the machine which outputs the results to a text file on another machine which zabbix then reads and looks to see if the last value is greater than X number of files. The only issue I have is this only looks at the root of the file and nothing in subfolders. Anyone have a quick solution to make the script look in subfolders?
EDIT: Wrote a script to find the file count of each folder and subfolder which wrote to a log file if too many files were found, then made a log file monitor in zabbix to watch that file for new entries. Not sure why this 2000 server was being so picky but found a way around it.Last edited by Josh; 21-12-2011, 21:51.Comment
-
I have simular errors (unable to set job info: [0x00000057] The parameter is incorrect.) after upgrading agents from 1.8.5 to 1.8.8/1.8.9 or 1.8.10.
simply replacing zabbix_agentd.exe with the newer version gives me these errors on Windows 2000 machines. I reverted them back to 1.8.5 and all is OK again.
On W2K3 and W2K8 => no problems. I run 1.8.10 on them without issues.
What changed after 1.8.5 (or possibly 1.8.6/1.8.7, I did not test those versions)?Comment
-
It seems like a W2k issue in the agent, same problem here. It returns the same error on any external execution, for every UserParameter, even running a simple system.run["dir"] on a zabbix_get from the server.
Using agent version 1.8.10Comment
-
-
I have implemented a Proof Of Concept in this patch:
patch against 2.0.4 sourcesZabbix Certified Specialist for Large Environments since 12/2010Comment
-
apply patch
How do I apply this patch?
I have implemented a Proof Of Concept in this patch:
patch against 2.0.4 sourcesComment
-
An easy solution for windows envs should be:
system.run[dir /A-d "C:\failed\logs\" | find /c "/"]
And trigger like:
{hostname:system.run[dir /A-d "C:\failed\logs\" | find /c "/"].str("File Not Found")}=0
Regards.Last edited by angelhc; 21-05-2014, 14:54.Number of hosts 1600,Number of items +90k,Number of triggers +22k, Number of users +100, New values per second +1270
http://zabbixes.wordpress.com/Comment
Comment