Skip to content

Using POE to hook syslog-ng

Being able to do analysis, sorting, or database storage of syslog messages is incredibly useful. There are tons of solutions on the market to do just that. If you’re working on a system developed in house that you’d like to incorporate syslog messages into, then it may be easier to hook directly into the syslog stream than to introduce another piece of software into the environment which needs to be glued.

Syslog-ng facilitates easy integration with Perl binaries as the Perl program is spawned once during the daemon start up and a handle to that program’s STDIN is maintained for dispatching of messages. Using POE, we can turn this into an event driven model, making additional complexity simple.

In this example, we’ll create a POE Master session that receives all of the syslog-ng input from STDIN. Using off the shelf components, we’ll run a TCP Server on port 9514 that will allow clients to connect and subscribe to feeds based on the “program” name of the message being dispatched.
Continue reading ›

Share and Enjoy:
  • Reddit
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Google
  • Ma.gnolia
  • Facebook
Tagged , , , , ,

YAPC::NA 10th Anniversary Wrap Up Post

I got back from YAPC::NA #10 yesterday. There was a lot of sleeping required to recover from a tech conference with 8 am talks! A Twitter Search for “yapc” indicates I’m not the only one slow to recover those missing hours of sleep.

Overall the conference was a fantastic success. There were highs and lows, and I just wanted to take an opportunity to thank the conference organizers!! They did a wonderful job putting together another spectacular conference.

Also wanted to thank all the speakers as I know firsthand how much work goes into presenting at a conference like YAPC. All the talks I attended were great, however several stood out as exceptional:

  • Trapped in a Room with Schwern – Michael Schwern is an excellent speaker, and this free room talk with back and forth between him and members of the community at all levels of mastery provided insight into projects I was unaware of, as well as some relief that most of my concerns about Perl 5 were being discussed by people far smarter than myself.
  • The Future of DBIx::Class – Matt S Trout (MST) is a speaker for the real programmers. His volume, accent, and excessive use of profanity actually keep people listening. Getting yelled at by Matt Trout was the highlight of this conference for me. He has good ideas and opinions and he’s not afraid to beat them into your head. Kid gloving is great for Managers, but his presentation style and content really clicks with the people who don’t have their heads so far up their own asses to understand things need to change. Excellent talk about the past, present, and future of DBIx::Class which is the most significant ORM in the Perl Community currently.
  • Take Advantage of Modern Perl – chromatic’s speaking style is the complete opposite of MST’s, but his message synced with Schwern, MST, and the The Enlightened Perl Organisation: Encourage people to write better Perl. Write Better Perl. Teach others how to write better Perl. Embrace the language where it is now, and transition away from the bad things in the past. Fantastic Talk.
  • perl5i: Perl 5 Improved – Michael Schwern echoing chromatic’s plea for leveraging the best of what Perl 5 offers today. He’s got a module on cpan, perl5i, which implements the best of Perl 5 Tribal Knowledge.
  • Catching an ::Std – MST again. He very honestly covered the trials, tribulations, and evolution of “Best Practices” in the Perl community.
  • Drop in REPL for CGI Applications – Brock Wilcox floored everyone demonstrating his ridiculously cool module CGI::Inspect. I went in expecting “neat” and found “amazing.” We’ll be abusing this in development very soon.

These were my favorite talks, but like I said, every talk I went to was fantastic. I did miss a few talks I wanted to see due to schedule conflicts, but I’ll be checking the YAPC website for slides and video/audio. The conference organizers were not able to record anything, but a few attendees brought recording equipment with them. If nothing else, I’ll hopefully see those missed talks next year or at the Pittsburgh Perl Workshop in 2010!

I’m recommitting to the Perl Iron Man. I was an idiot and jackass for bailing after 1 post! :)

Share and Enjoy:
  • Reddit
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Google
  • Ma.gnolia
  • Facebook
Tagged , ,

Perl Iron Man Contest

Matthew S Trout has started a Perl Iron Man challenge to encourage Perl users to become active in the blogosphere.  Not many people outside of the Perl echo chamber realize how active and modern the language.  A lot of the concepts that trampolined Ruby and Python into the forefront of Web 2.0 have been alive and well in the Perl community for a long time.  With the advent of Moose, Perl5 is as serious an Object Oriented language as Python and Ruby.

I entered myself today.  The goal is blog about Perl atleast once a week.  As I’m splitting my development time between a Catalyst Project and a number of POE projects, I expect my posts to be along those lines.  I’ll eventually share my DBIx::Class scripts as well.  There should be something for everyone, especially @strcpy!  (He loves my Perl blogging).

Look for code related stuff early next week!

Share and Enjoy:
  • Reddit
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Google
  • Ma.gnolia
  • Facebook
Tagged , , , ,

Perl is Dead

I’ve been doing web application development for years in several languages. I’ve spent time with PHP, Java, but primarily Perl. I consider myself a “Perl Programmer” first, everything else second. Until recently, most people would equate that to “Dinosaur.” However, there’s been a revival of Perl these days! There are a number of reasons for this.

Continue reading ›

Share and Enjoy:
  • Reddit
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Google
  • Ma.gnolia
  • Facebook
Tagged , , , , , , ,

From cfEngine to Puppet: A retrospective

For several years I’ve managed to bend cfEngine 2.0’s architecture to my will.  Being an experienced Perl programmer, I was able to abuse the configuration language snytax in order to accomplish a number of strange things including Copy Back and automated management of OSSEC-HIDS.  However, there comes a point when the managing the cfengine configs becomes a burdensome and incredibly unmanageable.   I mean, sure, I know what they do.  How will any of my co-workers understand them?

After several colleagues recommending Puppet, I hesitantly began the slow, brain fscking process of:

  1. Understanding exactly what I had accomplished with cfEngine.
  2. Understanding Ruby (ugh, I’m so thankful for Perl)
  3. Understanding how to express my cfengine feelings in a way Puppet will understand without hurting it’s feelings
  4. Profit.

Continue reading ›

Share and Enjoy:
  • Reddit
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Google
  • Ma.gnolia
  • Facebook
Tagged , , ,

Pittsburgh Perl Workshop 2008

I had the pleasure of speaking at the 2008 Pittsburgh Perl Workshop. Due to some rather depressing news on the home front, I was only able to attend Saturday’s track and the Event Dinner. Everything was awesome as usual. I was even surprised to learn new things in the Advanced Pattern Matching talk.

My talk was titled Network Introspection with Open Source Tools and was an overhaul of the presentation that I did at LinuxWorld earlier this year. I took the feedback of the audience and tuned the talk to a Perl centric audience. I wasn’t heckled badly on IRC, which is the ultimate gauge of success.

I’d like to thank the organizers, CMU, sponsors, and The Perl Foundation for another successful year of the Work Shop. Next year, Pittsburgh is hosting YAPC::NA, and will not be hosting the Pittsburgh Perl Workshop. I look forward to being able to drive to YAPC!

If you saw the talk and want to rant about it, feel free to do so here.

Share and Enjoy:
  • Reddit
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Google
  • Ma.gnolia
  • Facebook
Tagged , ,

Domestic Security

Domestic Security

Domestic Security


Just a little comic to remind ourselves what we’re giving away for “Security.” This is not what our founding fathers had in mind. I’m disappointed in the US Government and it’s people.

Share and Enjoy:
  • Reddit
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Google
  • Ma.gnolia
  • Facebook
Tagged

LinuxWorld 2008 and the goings on..

I had the privilege of speaking at LinuxWorld 2008 in San Francisco this year. It was a lot of fun and I certainly enjoyed the discussions with folks after my talk. My talk was on “Network Introspection with Open Source Tools” and I threatened to post updates on my progress here.

I’ve been working on packaging the code that I have into something that might be useful to the general public. I’ll post another blog entry when I have a rough cut version of the package available for testing/breaking.

Share and Enjoy:
  • Reddit
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Google
  • Ma.gnolia
  • Facebook
Tagged , ,

Updates, Recent Downtime

If you’ve noticed (probably not), recently the server has been unreachable. A few weeks back this was due to a bad hard drive. I finally transferred everything over to the new hard drive and got the sites back up and running thanks to a few friends and The Planet.

Then this weekend, the data center that hosts this server exploded. The site is back up and running now, but there should be a few more hours of downtime on the horizon as they install and integrate a permanent electrical infrastructure to the data center.

Also, I’ve been selected to speak at the Linux World Expo in San Fransisco this year! My talk is “Network Introspection with Open Source Tools.” If you’re going, please stop by and heckle me!

I may start updating this blog at some point.

Share and Enjoy:
  • Reddit
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Google
  • Ma.gnolia
  • Facebook
Tagged , ,

Pittsburgh Perl Workshop 2007

I’ve attended 4 Perl Conferences in the past 2 years.  This year’s Pittsburgh Perl Workshop is the first that I’ve presented at.  My talk was titled Security through Detection, Prevention, and Introspection. I have slides available.

I originally wanted to present a bunch of code, but I couldn’t really find a way to make the code very interesting.  I wanted to teach people that security is part of all of their jobs.  I made it a point to reveal some of the idiocy of the Federal Government Mandates in relation to IT Security.  I also gave an overview of the security system I’m building with Perl at work.

There were laughs, smiles, and a lot of people woke up.  All in all, I’d say it went very well.  I’d like to refine the presentation and possibly resubmit for YAPC::NA this year.  Bigger audience, and an opportunity for me to conquer a large slice of my stage fright.

If anyone out there reading this saw the presentation and has feedback, please comment on this post!

UPDATE: If you enjoyed the content of my talk on security, please check out these articles I’ve written:

Share and Enjoy:
  • Reddit
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Google
  • Ma.gnolia
  • Facebook
Tagged ,