RudePuppyDog
asked on
LogSurfer error reading config file
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"
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"
ASKER
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
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
What's the actual contents of the configuration file that's causing the problem?
ASKER
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.
# 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.
That'll explain it.
ASKER
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"
"...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"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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'.