Change epoch time to date in nagios.log
Posted: Tue Aug 01, 2017 11:50 am
Moderator Edit: This thread has been split from another - https://support.nagios.com/forum/viewto ... 16&t=44154
In the future, please create a new thread and link to the old one instead of adding on.
Hi ,
i have tried using the script
"tail -50 /usr/local/nagios/var/nagios.log | perl -pe 's/(\d+)/localtime($1)/e'"
But i am getting a message as
[root@SESKLNGLSIDV01 /]# tail -50 /usr/local/nagios/var/nagios.log | perl -pe 's/(\d+)/localtime($1)/e'
tail: cannot open `/usr/local/nagios/var/nagios.log' for reading: No such file or directory
[root@SESKLNGLSIDV01 /]#
There is no such file like Nagios.log in our environment . In this scenario how to change the time to readable format
In the future, please create a new thread and link to the old one instead of adding on.
Hi ,
i have tried using the script
"tail -50 /usr/local/nagios/var/nagios.log | perl -pe 's/(\d+)/localtime($1)/e'"
But i am getting a message as
[root@SESKLNGLSIDV01 /]# tail -50 /usr/local/nagios/var/nagios.log | perl -pe 's/(\d+)/localtime($1)/e'
tail: cannot open `/usr/local/nagios/var/nagios.log' for reading: No such file or directory
[root@SESKLNGLSIDV01 /]#
There is no such file like Nagios.log in our environment . In this scenario how to change the time to readable format