{"id":1649,"date":"2015-04-01T09:54:25","date_gmt":"2015-04-01T08:54:25","guid":{"rendered":"http:\/\/www.zarrelli.org\/blog\/?p=1649"},"modified":"2015-04-01T09:54:25","modified_gmt":"2015-04-01T08:54:25","slug":"just-a-useful-one-line-trick-for-nagios-logs","status":"publish","type":"post","link":"https:\/\/www.zarrelli.org\/blog\/just-a-useful-one-line-trick-for-nagios-logs\/","title":{"rendered":"Just a useful one line trick for Nagios logs"},"content":{"rendered":"<p>Nagios logs timestamp is not human readable, so how to see when something\u00a0occurred? Here is a one line trick to convert log from epoch timestamp to human readable time:<\/p>\n<pre class=\"lang:sh decode:true \">cat nagios.log | perl -pe 's\/(\\d+)\/localtime($1)\/e'<\/pre>\n<p>&nbsp;<\/p>\n<p>Found on:\u00a0http:\/\/unix.stackexchange.com\/a\/2992i<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nagios logs timestamp is not human readable, so how to see when something\u00a0occurred? Here is a one line trick to convert log from epoch timestamp to human readable time: cat nagios.log | perl -pe &#8216;s\/(\\d+)\/localtime($1)\/e&#8217; &nbsp; Found on:\u00a0http:\/\/unix.stackexchange.com\/a\/2992i<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[460,458,494,459,209],"class_list":["post-1649","post","type-post","status-publish","format-standard","hentry","category-di-tutto-un-po","tag-epoch","tag-logs","tag-nagios","tag-timestamp","tag-unix","without-featured-image"],"_links":{"self":[{"href":"https:\/\/www.zarrelli.org\/blog\/wp-json\/wp\/v2\/posts\/1649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zarrelli.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zarrelli.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zarrelli.org\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zarrelli.org\/blog\/wp-json\/wp\/v2\/comments?post=1649"}],"version-history":[{"count":0,"href":"https:\/\/www.zarrelli.org\/blog\/wp-json\/wp\/v2\/posts\/1649\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zarrelli.org\/blog\/wp-json\/wp\/v2\/media?parent=1649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zarrelli.org\/blog\/wp-json\/wp\/v2\/categories?post=1649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zarrelli.org\/blog\/wp-json\/wp\/v2\/tags?post=1649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}