Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: question on log_watcher input

by marinersk (Priest)
on Sep 10, 2015 at 00:27 UTC ( [id://1141488]=note: print w/replies, xml ) Need Help??


in reply to Re^2: question on log_watcher input
in thread question on log_watcher input

To answer your original question:

This line of code extracts the search string from the config file:

($string[$i], $action[$i], $actionargs[$i], $numrows[$i]) = split /\t+/, $_;

And this line decides if the logfile has a match:

if ($_ =~ /$string[$str_index]/i) {

As far as I can tell, if you were to put a regular expression in for your string in the config file, it would directly interpret it as such. This is a direct conflict with your statement that it doesn't take regular expressions.

Have you tried

orchestral.*execution mail 1

at all? Because unless I'm missing something (and I sort of skimmed the code so it's of course possible), it sure looks to me like it would work.

Replies are listed 'Best First'.
Re^4: question on log_watcher input
by adewolf38 (Initiate) on Sep 10, 2015 at 14:12 UTC
    Yes sir that did work. I had previously tried (?=orchestral)(?=execution) , or just /orchestral/ /execution/ and some others. I'm still learning Perl and regex. Thanks very much for your input.

      Glad it worked!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1141488]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-16 07:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found