LabTech Support Forums

Monitoring for contents of files

This forum is for discussion of monitor related issues.

Moderator: jware.connectwise

Monitoring for contents of files

Postby Guest » Mon May 10, 2010 7:43 am

Hi,

We need to set up some monitors to alert us when certain files contain certain strings. This is to monitor logs for things like "FAILED" or "ERRROR".

I can't see a way to do this using the monitors available.

Is there a way to do this with a monitor? If not, whats the best way to handle it?

Olly
Guest
 

Monitoring for contents of files

Postby Guest » Mon May 10, 2010 4:27 pm

Do the following:

1) Create new monitor on the machine you are monitoring
2) Don't use the Monitor Wizard
3) Set initial information for Location & Alerting
4) For the Configuration Tab do the following:

a) Monitor Type = External EXE Check
b) Interval = 60 (change to suit needs)
c) Executable: %windir%\system32\cmd.exe
d) Arguments = /c type c:\[path to file]\[filename]
e) Check Condition = Contains
f) Result = FAILED or ERROR
Last edited by Guest on Mon May 10, 2010 4:30 pm, edited 1 time in total.
Guest
 

Monitoring for contents of files

Postby Guest » Tue May 11, 2010 3:26 am

Thanks kevin,

I'm assuming that if we do it that way Labtech will check the whole file each time, so it will alert if ERROR appears once or keeps appearing every 10 minutes.

Perhaps I could request an enhancement whereby a new monitor is created for checking the contents of files and which tracks the line numbers, so that if you ERROR appears once in a file then labtech knows which line and wont alert on the same instance. This is something that kaseya and N-able had which we used a lot.

Thanks.
Guest
 

Monitoring for contents of files

Postby Guest » Tue May 11, 2010 8:40 am

True, it will search the entire contents so if it appears once, then again, it will alert b/c there is an instance of the string. What I would suggest doing is creating a script that renames the log file and/or create the script to handle the counting and have the script raise the alert. That way, if the monitor detects the phrase, the script then would be called and perform the counting mechanism to see if its been alerted already or not. Either way would work. It all depends on your remediation process.
Guest
 

Re: Monitoring for contents of files

Postby charles.wenger.fourwindsinteractive » Thu Mar 03, 2016 1:53 pm

Guest wrote:Do the following:

1) Create new monitor on the machine you are monitoring
2) Don't use the Monitor Wizard
3) Set initial information for Location & Alerting
4) For the Configuration Tab do the following:

a) Monitor Type = External EXE Check
b) Interval = 60 (change to suit needs)
c) Executable: %windir%\system32\cmd.exe
d) Arguments = /c type c:\[path to file]\[filename]
e) Check Condition = Contains
f) Result = FAILED or ERROR



This is awesome, thank you so much!!
charles.wenger.fourwindsinteractive
Newbie
Newbie
 
Posts: 1
Joined: Fri Sep 04, 2015 6:01 pm


Return to Monitors

Who is online

Users browsing this forum: No registered users and 6 guests