skip to main | skip to sidebar

In Search of Updates

2013-10-24

Printing readable dates from the Nagios log

Just because I always forget...
ben@nagios1:/var/log/nagios3$ grep 'mycheck-or-host' nagios.log |perl -pe 's/(\d+)/localtime($1)/e'
The perl snippet will translate the epoch-style timestamp to one that is readable.
Posted by ben at 4:08 PM No comments:
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

AddThis

Bookmark and Share
Go back to
ben.hartshorne.net

Labels

  • iPhone (5)
  • Photo (2)
  • rant (7)

Blog Archive

  • ►  2017 (2)
    • ►  March (1)
    • ►  January (1)
  • ►  2016 (8)
    • ►  October (1)
    • ►  April (1)
    • ►  March (6)
  • ►  2015 (3)
    • ►  May (1)
    • ►  March (2)
  • ►  2014 (2)
    • ►  February (2)
  • ▼  2013 (4)
    • ▼  October (1)
      • Printing readable dates from the Nagios log
    • ►  September (1)
    • ►  July (1)
    • ►  March (1)
  • ►  2012 (1)
    • ►  October (1)
  • ►  2011 (3)
    • ►  June (1)
    • ►  May (1)
    • ►  April (1)
  • ►  2010 (2)
    • ►  May (1)
    • ►  March (1)
  • ►  2009 (6)
    • ►  September (1)
    • ►  March (1)
    • ►  January (4)
  • ►  2008 (8)
    • ►  December (1)
    • ►  October (6)
    • ►  July (1)

Feed me!

Posts
Atom
Posts
All Comments
Atom
All Comments

Contributors

  • -ben
  • ben