You only need to really worry about 2 directories. The most important is the /usr/local/nagios/etc directory. This contains all your cfg files. The other you may need to move is the /usr/local/nagios/libexec this directory contains all your plug-ins. If you have developed your own plug-ins there may be more in this directory on your old server than on your new server.
Please note that you need to copy all directories under the 2 I listed above. Also, the /usr/local/nagios directory is the default directory if you installed Nagios from source. These directories may be different on your old server. If those directories do not exist look for a file called nagios.cfg. This is the default Nagios configuration file.
Also you may want to consider…
Logs (for historical information):
/usr/local/nagios/var/nagios.log
/usr/local/nagios/var/archives/.
Host/Service Status at last nagios shutdown:
/usr/local/nagios/var/retention.dat
Make sure your rights and permissions are identical after copying from the source to the target server
[blockquote]In choice No.2 it’s some plug-in for nagios.
But if my old and new is the same plug-in version.
Is it necessary to copy from old server to new server?[/blockquote]nope… in fact it is better to compile and install the plugins as you have done in case there are any differences in the system architecture such as paths etc., as long as you make sure any custom checks that may have been created are copied across
[blockquote]and another files in /usr/local/nagios/var/.
is that necessary to transfer to the new one?[/blockquote]nope
[blockquote]If I didn’t copy any files from choice no.3 - no.5
to new server, is that means the new server can working without history?[/blockquote]Yes, it’ll be like starting afresh from day 1.
Also, don’t forget to consider the config files and suchlike for addons like NRPE, NDOUtils, pnp4nagios, nagvis, rrdtool/mrtg etc. etc. etc. should you have any of those installed