Forum Discussion
I think Test Script button has a timeout of 1 min and scheduled checks default to two minutes. You can change it in the collector agent.conf but keep in mind this is across all scripts the collector would run. Generally you would want scripts to run as fast as possible since items are queued (default is 10 checks simultaneously I think) so be careful not to bog down the collector with checks just waiting for timeouts or run them too frequently.
Also keep in mind that checks like test-path can have long timeout itself so if a path or two is really down, your script might fail completely even with a >2 min timeout on the collector. Then you wouldn't be able to tell which failed and if you didn't implemented No Data alerts, you might not even know it not working. It might be better to instead check each path separately. That will let the UNC checks run in parallel and one path timing out will not cause the others to also fail. The easiest way to do that is make the DataSource multi-instance and using the "script" method (instead of batch script). It also lets you get separate stats for each path.
Have you looked at the built-in UNC Monitor check?
As a side note, it's also generally it's better to make checks generic using tokens/properties rather then hard code values into the code. Provide more flexibility and reuse later. The multi-instance way above is also a good way to do that.
Related Content
- 8 months ago
- 11 months ago