Upgrade nagios 3.5.1 to 4.3.2

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Upgrade nagios 3.5.1 to 4.3.2

Postby pintu » Fri Jun 09, 2017 6:36 am

Where is the nagios configuration file?
I have upgraded from 3.5.1 to 4.3.2 and nagios uses nagios3 configuration files that are located in a different directory than /usr/local/nagios/
The apache directory is /usr/local/nagios/share/, but nagios uses old configuration files in another directory
Where to change the location to the nagios configuration file?
pintu
 
Posts: 9
Joined: Fri Jun 09, 2017 6:33 am

Re: Upgrade nagios 3.5.1 to 4.3.2

Postby mcapra » Fri Jun 09, 2017 11:27 am

Where Nagios Core looks for configuration objects depends on the main nagios.cfg file. Mine is found here and contains the following directives to point to some configuration objects:

Code: Select all
[root@nagios ~]# cat /usr/local/nagios/etc/nagios.cfg | grep cfg_
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
cfg_file=/usr/local/nagios/etc/objects/hostgroups.cfg
#cfg_file=/usr/local/nagios/etc/objects/windows.cfg
#cfg_file=/usr/local/nagios/etc/objects/switch.cfg
#cfg_file=/usr/local/nagios/etc/objects/printer.cfg
# extension) in a particular directory by using the cfg_dir
cfg_dir=/usr/local/nagios/etc/hosts
cfg_dir=/usr/local/nagios/etc/services
#cfg_dir=/usr/local/nagios/etc/switches
#cfg_dir=/usr/local/nagios/etc/routers
# object configuration files (see the cfg_file and cfg_dir options above).


So if all my configuration files were located somewhere else, I would need to change all my cfg_file and cfg_dir values. Or create symlinks. Probably best to just update the main nagios.cfg file.

Unless i'm misunderstanding what you're looking for. If I am, could you please clarify?
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 2773
Joined: Thu May 05, 2016 3:54 pm

Re: Upgrade nagios 3.5.1 to 4.3.2

Postby tgriep » Fri Jun 09, 2017 1:14 pm

Thanks @mcapra for the help, @pintu if you have any further questions, let us know.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 6019
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgrade nagios 3.5.1 to 4.3.2

Postby pintu » Mon Jun 12, 2017 7:14 am

I installed nagios from repositories
The configuration of the hosts is in the directory /etc/nagios3/
Then I upgraded nagios to version 4.3.2 and the configuration files of this version 4.3.2 are in the /usr/local/nagios/
but nagios continues to use the old configuration (/etc/nagios3/ not /usr/local/nagios/)
Do you understand my question?
pintu
 
Posts: 9
Joined: Fri Jun 09, 2017 6:33 am

Re: Upgrade nagios 3.5.1 to 4.3.2

Postby pintu » Mon Jun 12, 2017 7:22 am

And as I go to the nagios page I have a message:
[b]unable to get process status [\b] (attachment)
Is this also the error associated with the above?
Attachments
nagios.JPG
nagios.JPG (14.76 KiB) Viewed 391 times
pintu
 
Posts: 9
Joined: Fri Jun 09, 2017 6:33 am

Re: Upgrade nagios 3.5.1 to 4.3.2

Postby pintu » Mon Jun 12, 2017 7:26 am

I found a solution https://support.nagios.com/forum/viewtopic.php?f=7&t=30236, but I have debian not centos
pintu
 
Posts: 9
Joined: Fri Jun 09, 2017 6:33 am

Re: Upgrade nagios 3.5.1 to 4.3.2

Postby tgriep » Mon Jun 12, 2017 9:43 am

Just to confirm but is the Nagios system running for you now?
If you don't have anymore questions, shall I close and lock the post for you?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 6019
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgrade nagios 3.5.1 to 4.3.2

Postby pintu » Tue Jun 13, 2017 2:37 am

But the problem was not solved
Nobody has an idea? So why would you want to close the post?
pintu
 
Posts: 9
Joined: Fri Jun 09, 2017 6:33 am

Re: Upgrade nagios 3.5.1 to 4.3.2

Postby lmiltchev » Tue Jun 13, 2017 10:52 am

How did you upgrade nagios to version 4.3.2? What document/guide/tutorial did you follow?

Run the following command:

Code: Select all
locate nagios > nagios.txt


then post the nagios.txt file on the forum, that was created by the above command in you current working directory.

Also, run:
Code: Select all
ps -ef | grep [n]agios

and show the output.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 9457
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade nagios 3.5.1 to 4.3.2

Postby pintu » Wed Jun 14, 2017 7:58 am

lmiltchev wrote:How did you upgrade nagios to version 4.3.2? What document/guide/tutorial did you follow?

https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/upgrading.html

lmiltchev wrote:
Code: Select all
locate nagios > nagios.txt

in attachment

lmiltchev wrote:
Code: Select all
ps -ef | grep [n]agios

and show the output.

Code: Select all
nagios     587     1  0 maj31 ?        00:00:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
nagios     874     1  0 maj31 ?        01:11:14 /usr/sbin/nagios3 -d /etc/nagios3/nagios.cfg
Attachments
nagios.txt
(221.99 KiB) Downloaded 12 times
pintu
 
Posts: 9
Joined: Fri Jun 09, 2017 6:33 am

Next

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 4 guests