cloning of Nagios server

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.
tomtom
Posts: 15
Joined: Wed Jul 22, 2015 10:06 am

cloning of Nagios server

Post by tomtom »

Hello,

I was looking at cloning our older physical nagios server to a vm in order to free up this hardware. The clone completed fine with the vmware vcenter converter software. I do have the clone up and running and can connect to the web gui, but it shows "Unable to get process status" on that page. We are running version 4.08.

The service is running if I run ps ax | grep nagios
4292 ? Ss 0:00 nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
5900 pts/o S+ 0:00 grep nagios

Is there something else I need to reconfigure in order to get this to work in a VM? I'm not real familiar with nagios yet so any help is appreciated!

Thanks!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: cloning of Nagios server

Post by hsmith »

tomtom wrote:Hello,

I was looking at cloning our older physical nagios server to a vm in order to free up this hardware. The clone completed fine with the vmware vcenter converter software. I do have the clone up and running and can connect to the web gui, but it shows "Unable to get process status" on that page. We are running version 4.08.

The service is running if I run ps ax | grep nagios
4292 ? Ss 0:00 nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
5900 pts/o S+ 0:00 grep nagios

Is there something else I need to reconfigure in order to get this to work in a VM? I'm not real familiar with nagios yet so any help is appreciated!

Thanks!
For some clarity here, could I ask you to post a screenshot of the error? There shouldn't have been complications switching over.
Former Nagios Employee.
me.
tomtom
Posts: 15
Joined: Wed Jul 22, 2015 10:06 am

Re: cloning of Nagios server

Post by tomtom »

Sure,

Here's what it is showing in Chrome:
Attachments
nagios.JPG
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: cloning of Nagios server

Post by hsmith »

tomtom wrote:Sure,

Here's what it is showing in Chrome:
What does service nagios status come back with?
Former Nagios Employee.
me.
tomtom
Posts: 15
Joined: Wed Jul 22, 2015 10:06 am

Re: cloning of Nagios server

Post by tomtom »

Ok, it looks like the actual nagios service didn't start maybe, just nrpe. When I do a check on this I see the following:

[root@nagios etc]# service nagios start
Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration.
[root@nagios etc]# service nagios status
No lock file found in /usr/local/nagios/var/nagios.lock
tomtom
Posts: 15
Joined: Wed Jul 22, 2015 10:06 am

Re: cloning of Nagios server

Post by tomtom »

oops meant to add this:

[root@nagios etc]# nagios -v
nagios: error while loading shared libraries: libltdl.so.3: cannot open shared object file: No such file or directory
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: cloning of Nagios server

Post by hsmith »

Can you try to run a /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg and see what happens?
Former Nagios Employee.
me.
tomtom
Posts: 15
Joined: Wed Jul 22, 2015 10:06 am

Re: cloning of Nagios server

Post by tomtom »

Sure, this is what it shows me:


Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Warning: use_embedded_perl_implicitly is deprecated and will be removed.
Warning: enable_embedded_perl is deprecated and will be removed.
Warning: p1_file is deprecated and will be removed.
Warning: sleep_time is deprecated and will be removed.
Warning: external_command_buffer_slots is deprecated and will be removed. All commands are always processed upon arrival
Warning: command_check_interval is deprecated and will be removed. Commands are always handled on arrival
Read main config file okay...
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/templates.cfg', starting at line 47)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/templates.cfg', starting at line 201)
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
Error: Unexpected token or statement in file '/usr/local/nagios/etc/servers/render.fchst.cfg' on line 8.
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

So I wonder if some of the config files were corrupted in the conversion, I wouldn't think so, but I guess you never know.
tomtom
Posts: 15
Joined: Wed Jul 22, 2015 10:06 am

Re: cloning of Nagios server

Post by tomtom »

I went ahead and removed the offending line in the one cfg file, stopped nrpe and restarted it but still get the lock file warning when trying to stop the nagios service.

Stopping nagios: No lock file found in /usr/local/nagios/var/nagios.lock

I looked at that directory I don't see a nagios.lock file:

drwxrwxr-x 5 nagios nagios 4096 Aug 24 14:37 .
drwxrwxr-x 9 nagios nagios 4096 Jun 30 2011 ..
drwxrwxr-x 2 nagios nagios 69632 Aug 20 23:59 archives
-rw-rw-r-- 1 nagios nagios 7637849 Aug 21 14:10 nagios.log
-rw-r--r-- 1 nagios nagios 201113 Jun 29 09:48 objects.cache
-rw------- 1 nagios nagios 311841 Aug 21 13:48 retention.dat
drwxrwsr-x 2 nagios nagios 4096 Aug 24 14:37 rw
drwxrwxr-x 3 nagios nagios 4096 Jun 30 2011 spool

However, I don't see one when I look on the old physical server either.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: cloning of Nagios server

Post by tgriep »

Try running the verification below and fix any errors.

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
As soon as there are no errors, start nagios by running the following.

Code: Select all

service nagios start
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked