Another Nagios Historical Data Question

Marc Powell lists at xodus.org
Mon Nov 15 15:38:59 CET 2010


On Nov 15, 2010, at 8:12 AM, Ales Rikovsky wrote:

> I know. It's stored in /var/log/nagios/archives/xxxxx.log
> 
> But I'm not hunger for rewriting the tons of files manually.
> Can anyone help me with the script or something like that, maybe if it 
> could ask for old and new names and rewrites all occurences in the log 
> liles correctly.
> ______
> ....
> Enter the old name:   blahblahold
> Enter the new name: blahblahnew


It could be something as simple as --

sed -i .bak 's/blahblahold/blahblanew/g' /var/log/nagios/archives/*.log

I leave how to pass the 'blahblahold' and 'blahblahnew' as a rather straighforward exercise for you.

--
Marc


------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list