cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Highlighted
Level 7

Monitor Text In File

I setup a file monitor to look for the text "Finished".  If it finds the text, the monitor is green.  If it doesn't find the text, the monitor remains green.  I would like a failure if the text is not found.  How can I accomplish this?

My ultimate goal is to send an alert if this monitor does not find the word "Finished."  I am sure I could pull this off with a VBScript.  However, I am hoping that your file monitor would provide a quick solution.

0 Kudos
8 Replies
Highlighted
Level 14

Re: Monitor Text In File

i notice you have both "Finished" and "Finished." and this is case-sensitive, but in your arguments do you have the full path looking like this?

-file C:\"Program Files"\SolarWinds\Orion\testfile.txt  -pattern Finished.

and then

Statistic Warning Threshold 1
Statistic Critical Threshold 1

0 Kudos
Highlighted
Level 7

Re: Monitor Text In File

I am utilizing the "File Watching" monitor and have it configured as follows:

File Name: refresh_mv.log

Directory:  \\server.domain.com\c$\dir1\subdir\

Credential:  specificaccount

RegEx Pattern: \i^.*?(Finished).*?$

The monitor is always green.  If Finished is there, it displays the find.  If there multiple times, shows all.  If no text found, shows zero and remains green.

0 Kudos
Highlighted
Level 7

Re: Monitor Text In File

Does anyone have any other thoughts on how to make this monitor fail if the text is missing from the log file?

0 Kudos
Highlighted
Level 14

Re: Monitor Text In File

my bad - i thought this was APM related but i see now it is not....i know nothing of IPMONITOR...sorry

bump - anybody out there that can help out 14ALL?

0 Kudos
Highlighted
Level 7

Re: Monitor Text In File

Thanks Ichance for trying. 

I am confused why a monitor would be included that doesn't have the ability to fail.  What am I missing?  The only way I can get this monitor to fail is if the file is missing.  However, I want to monitor the contents of this file for information or the lack of information.  If text found, success.  Otherwise fail.

Any suggestions anyone?

0 Kudos
Highlighted
Level 7

Re: Monitor Text In File

Taking a closer look at this monitor, it has the following options in Notification Control:

1.  Combine up to 15 found scenarios into one alert.

2.  Disabled - send up to 5 information alerts (individually).

3.  Disabled - send first found scenario.

I set the monitor to option3, setup an email alert to myself, and made sure all alert types were setup for notification.  I received notification that the pattern was found "x" number of times.  This monitor can be useful for informational purposes.  However, as an action monitor it is rather useless.

It would seem like a small step for ipMonitor to watch a log file (which it does), look for a string (which it does), and then let you decide whether the existance or lack of that string warrants an alert.  <<<=== FEATURE REQUEST HERE!!!!!

Going to plan-B:  vbscript

0 Kudos
Level 13

Re: Monitor Text In File

Hi 14ALL--

Thanks for the feature request highlight ;-). I'll mark this for the PM to see.

M

0 Kudos
Highlighted
Level 15

Re: Monitor Text In File

Hi 14All: Thanks for the input. I entered this as a feature request - for internal users it's FB 12219. 

--Christine

0 Kudos