Custom Check files got changed after Nagios XI Upgrade

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Custom Check files got changed after Nagios XI Upgrade

Post by lrnnetops »

Hi,

I am re-posting the issue from my paid subscribed account.

# Server Details
Machine Type – Virtual Machine
Server Operating System - CentOS release 6.7
Operating System Architecture - i686

# Nagios XI Details
Old Version - 2014R2.7
Upgraded to Version - 5.4.4

We performed Nagios XI upgrade from version 2014R2.7 to latest version 5.4.4.

Followed below steps to version upgrade -

1 - cd /tmp
2 - wget https://assets.nagios.com/downloads/nag ... est.tar.gz
3 - tar xzf xi-latest.tar.gz
4 - cd nagiosxi
5 - ./upgrade

By performing above process i got the message "Nagios XI Upgrade Complete!"

After the upgrade we received alerts for oracle DB checks. After investigation we found that template file (/usr/local/nagios/libexec/check_oracle_mv.pl) which we were using for oracle DB check got edited.

We set oracle environment variable as "11.2.0" as variable in template file before upgrade but after upgrade it was showing "8.1.7" as set variable in template file (/usr/local/nagios/libexec/check_oracle_mv.pl). because of this all our oracle DB checks were getting failed.

/usr/local/nagios/libexec/check_oracle_mv.pl is a custom script written for oracle DB checks.

Is Nagios XI upgrade edit the custom check scripts (/usr/local/nagios/libexec/check_oracle_mv.pl) at the time of upgrade?

NOTE = "check_oracle_mv.pl" plugin was custom written by us & placed in "/usr/local/nagios/libexec/".

also wanted to know after performing "./upgrade" script what existing nagios xi files it modify / edit / changes.

Thanks in advance,
Rohan
You do not have the required permissions to view the files attached to this post.
Last edited by dwhitfield on Fri Jun 02, 2017 10:13 am, edited 1 time in total.
Reason: marking with green check mark
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Custom Check files got changed after Nagios XI Upgrade

Post by lmiltchev »

How your oracle DB checks are defined? What do you have in the "oracle DB checks" directive? If you modified the "default" oracle commands (instead of creating new, custom commands), the "defaults" would be overwritten on an upgrade.

Having said that, no custom plugins will be (should be) overwritten on an upgrade.

For testing purposes, I placed your script in /tmp directory on a CentOS 6, Nagios XI 2014R2.7 server, and named it "check_oracle_mv.pl.orig". I copied it over to libexec:

Code: Select all

cp -p check_oracle_mv.pl.orig /usr/local/nagios/libexec/check_oracle_mv.pl
Next, I performed an upgrade to Nagios XI 5.4.4 and compared the original file to the one in the "libexec" directory. They were identical:

Code: Select all

Nagios XI Upgrade Complete!
---------------------------


You can access the Nagios XI web interface by visiting:
    http://192.168.x.x/nagiosxi/

[root@TEST_XI_CentOS_6 nagiosxi]# diff /usr/local/nagios/libexec/check_oracle_mv.pl /tmp/check_oracle_mv.pl.orig
[root@TEST_XI_CentOS_6 nagiosxi]#
As you see from the diff command, no changes were made during the upgrade to check_oracle_mv.pl.
Be sure to check out our Knowledgebase for helpful articles and solutions!
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Re: Custom Check files got changed after Nagios XI Upgrade

Post by lrnnetops »

HI lmiltchev,

Thank you for your help.

We perform the upgrade & till now didn't found any issue.

We can mark this thread as resolved.

Regards,
Rohan
Locked