NetXMS Support Forum  
September 11, 2010, 02:43:53 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: NetXMS 1.0.4 released
 
   Home   Help Search Tags Login Register  
Pages: [1]
  Print  
Author Topic: Stuck file Agent  (Read 161 times)
redro
Newbie
*
Posts: 20


View Profile
« on: July 14, 2010, 06:22:18 pm »

Hi All,

I am very new to NetXMS. Here is my requirement : I want to monitor for a .txt file should not stuck more than 15 min in c:/tmp folder.
For that which Agent Parameter i have to choose
Please suggest me.
Thanks.
JP
Logged
Victor Kirhenshtein
Lead Developer
Administrator
Hero Member
*****
Posts: 1458


View Profile
« Reply #1 on: July 15, 2010, 02:18:47 am »

Hi!

Yo can use File.Count parameter. Full syntax is following:

File.Count(path, pattern, recursive, size, age)

where

pathpath to directory or file to check
patternpattern for file name matching
recursiverecursion flag; if set to 1 or true, agent will scan subdirectories
sizesize filter (bytes); if < 0, only files with size less than abs(value) will match; if > 0, only files with size greater than value will match; if 0, all files will match
ageage filter (seconds); if < 0, only files created after now - abs(value) will match; if > 0, only files created before now - value will match; if 0, all files will match

path argument is mandatory, all other are optional.

So, to count number of .txt files older than 15 minutes in c:\tmp, you can use

File.Count('C:\tmp', '*.txt', 0, 0, 900)

And after that you just need to set threshold for this parameter to >0, generate appropriate event, and process it as usual.

Best regards,
Victor
Logged
redro
Newbie
*
Posts: 20


View Profile
« Reply #2 on: July 15, 2010, 03:27:33 pm »

Victor,

Great help, how ever i am looking for Error in Tomcat log file. basically tomcat will write the log on console. I have tried with several agents but no luck. Could you please don't hesitate to assist me.

And i am not able to understand threshold theory, i have gone through the user manual and google search too. If you have any information on the same please help me.

Thanks,
JP.
Logged
redro
Newbie
*
Posts: 20


View Profile
« Reply #3 on: July 28, 2010, 05:04:19 pm »

Hi Victor,

As per your suggestions i have created txt file monitoring by parameter as 'Temp\','SAS*.txt',true,>0,90 And threshold screen shot is attached. Today what i have observed is there is one file sit from 2 days but i didn't get alarm and i have created totally 5 DCIs all are connected to SYS_THRESHOLD_REACHED. But When ever the process down i am getting only Java process Alarm Remaining are not. Please advise me and confirm me like we have to choose different Threshold for every DCI.

Thanks,
JP
Logged
Victor Kirhenshtein
Lead Developer
Administrator
Hero Member
*****
Posts: 1458


View Profile
« Reply #4 on: July 28, 2010, 07:24:03 pm »

First of all, you have to specify full path, not just Temp. Second, you have syntax errors in recursion and size parameters - you should use only digits here. So, parameter should looks like

File.Count('C:\Temp', 'SAS*.txt', 1, 0, 90)

to count number of files older than 90 seconds.

Then, threshold by itself looks correct, but did you create appropriate rule in event processing policy?

Also, take a look at this step-by-step configuration example: http://www.netxms.org/documentation/confexample/. It's quite old, and screens  will look a bit different, but you should get an idea.

Best regards,
Victor
Logged
Tags:
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!