Renaming host & historical data

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Renaming host & historical data

Post by amprantino »

Is it possible to rename a host or service without loosing the historical data ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Renaming host & historical data

Post by scottwilkerson »

Not in Nagios Core. In Nagios XI this is mostly possible using the rename utility, however even then the availability report will not be fully correct unless you were to replace all of the host/service entries in the nagios.log and all of the log files in the archive directory.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: Renaming host & historical data

Post by amprantino »

So:
- I rename the host
- the same time I use sed to replace the old name with the new one (nagios.log & archive directory)

Any other info saved somewhere?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Renaming host & historical data

Post by jdalrymple »

amprantino wrote:So:
- I rename the host
- the same time I use sed to replace the old name with the new one (nagios.log & archive directory)
This is where Core gets all of it's historical data unless you're talking perfdata which is a whole other debacle. I've never done it, but I expect what you're trying to achieve would yield favorable results, maybe.
Locked