Solved

LogSurfer error reading config file

Posted on 2004-03-25
9
261 Views
Last Modified: 2013-12-26
I'm getting the following error when starting logsurfer:
error in match_not_regex of rule: ________________________
config error arround line 13: ________________________

The dumpfile output is:

**** dumpfile of logsurfer from Thu Mar 25 13:37:58 2004

*******************************************************
* RULES
*
*     match_regex match_not_regex
*           stop_regex stop_not_regex timeout [continue]
*           action
*******************************************************

-----
Please Wait. Shutting Down Controller -
        - - 0 CONTINUE
        EXEC "rtaler_mailx.sh   'Please Wait. Shutting Down Controller' 'Please Wait. Shutting Down Controller' $0"

*******************************************************
* CONTEXT Information
*
*     match_regex match_not_regex
*           max_lines timeout_abs timeout_rel action
*           contents
*******************************************************

**** dumpfile end


I created a similar configuration file, and it works fine.  

configuration file is:
# FileName: rtaler_{ENTITY}.cfg
#
# Description: This file is ready by rtaler.sh and contains rules for the logsurfer program
#
# Syntax:
#   <match_regex> <not_match_regex> <stop_regex> <timeout> [continue] <action>
#   For more information, perform search on web for logsurfer man page.
#
#
'Please Wait. Shutting Down Controller' - - - 0
        exec "rtaler_mailx.sh   'Please Wait. Shutting Down Controller'
                'Please Wait. Shutting Down Controller' $0"
0
Comment
Question by:RudePuppyDog
9 Comments
 
LVL 9

Expert Comment

by:Alf666
ID: 10682440
I don't know this software, but don't you have one too many dashes ?

match_regex is 'Please Wait. Shutting Down Controller'
not_match_regex is '-'
stop_regex is '-'

timeout is '-' ?? Should be 0.
Then, action would be 'exec ...etc'.
0
 

Author Comment

by:RudePuppyDog
ID: 10682671
I thought so too, but  It wont work without the extra "-".  Actually, the dump file
has
   match_regex match_not_regex stop_regex stop_not_regex timeout

so match_regex is 'Please Wait. Shutting Down Controller'
and then 3 "-", then 0 for the timeout.

Anyways, I figured out the problem.  Problem is that the config file was saved with null characters & logsurfer didnt like that.  So I remove the null characters with
tr -d '\0' <config.old > config.new

Thanx
-Rudy
0
 
LVL 48

Expert Comment

by:Tintin
ID: 10683495
What's the actual contents of the configuration file that's causing the problem?
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:RudePuppyDog
ID: 10683520
Here is the contents

# FileName: rtaler_{ENTITY}.cfg
#
# Description: This file is ready by rtaler.sh and contains rules for the logsurfer program
#
# Syntax:
#   <match_regex> <not_match_regex> <stop_regex> <timeout> [continue] <action>
#   For more information, perform search on web for logsurfer man page.
#
#
'Please Wait. Shutting Down Controller' - - - 0
        exec "rtaler_mailx.sh   'Please Wait. Shutting Down Controller'
                'Please Wait. Shutting Down Controller' $0"


Looks normal, but when you open the file in vi, it says it has null characters.  I should point out that the file is created on VMS & nfs mounted on Solaris.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 10683556
That'll explain it.
0
 

Author Comment

by:RudePuppyDog
ID: 12086430
Answered own question in comment dated 03/25/2004 03:05PM PST

"...Anyways, I figured out the problem.  Problem is that the config file was saved with null characters & logsurfer didnt like that.  So I remove the null characters with
tr -d '\0' <config.old > config.new"
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 14394927
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now