Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 about the Monastery: (6)
As of 2015-07-05 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls