Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How do I extract named variable names from regex string

by pklausner (Scribe)
on Jan 30, 2012 at 16:31 UTC ( #950799=note: print w/ replies, xml ) Need Help??


in reply to How do I extract named variable names from regex string

This looks like a syslog message line. If you have access to the syslog daemon configuration and already use syslog-ng, you already have macros to split all the standard fields. Then you could pipe the payload message to your perl script. In there a split /[ =]+/ ... looks like it would yield the proper {name, value} pairs. I gather rsyslog has similar features.

Main advantage of this approach: your actions run in real-time, as the events come in.


Comment on Re: How do I extract named variable names from regex string

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2014-12-26 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (168 votes), past polls