This support forum board is for support questions relating to
Nagios XI , our flagship commercial network monitoring solution.
sib
Posts: 111 Joined: Thu Dec 11, 2014 8:06 am
Post
by sib » Mon Oct 10, 2016 4:57 am
Hi
Trying to upgrade to 5.3 but it fails with the following output
Code: Select all
NEW VALUES
--------------
xi_commands_command_id_seq = 848
xi_events_event_id_seq = 31697
xi_meta_meta_id_seq = 31701
xi_options_option_id_seq = 159
xi_sysstat_sysstat_id_seq = 101
xi_usermeta_usermeta_id_seq = 643
xi_users_user_id_seq = 54
Installing new PNP templates...
Updating init script...
Enabling large install tweaks...
Fixing config file permissions...
Fixing htpasswd permissions...
Checking group memberships...
Installing new XI templates...
URL: https://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies https://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.loginNAGIOSQL LOGIN FAILED
When I manually run it while nagiosxi is running
Code: Select all
# /usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies https://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.login
--2016-10-10 11:52:26-- https://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:443... connected.
WARNING: cannot verify localhost’s certificate, issued by “/C=CH/ST=Basel/L=Basel/O=Bank For International Settlements/OU=IMS/CN=lbnss22/[email protected] ”:
Self-signed certificate encountered.
WARNING: certificate common name “lbnss22” doesn't match requested host name “localhost”.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”
[ <=> ] 36,629 23.6K/s in 1.5s
2016-10-10 11:52:32 (23.6 KB/s) - “nagiosql.login” saved [36629]
You are searching for logout I guess
Code: Select all
# grep logout /home/ch002854/nagiosql.login
Logged in as: nagiosxi <a href='index.php?cmd=logout'>Logout</a> </div>
Reading from other posts. This is the output of show grants for the user nagiosql
Code: Select all
mysql> show grants for nagiosql@'localhost'
-> ;
+-----------------------------------------------------------------------------------------------------------------+
| Grants for nagiosql@localhost |
+-----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'nagiosql'@'localhost' IDENTIFIED BY PASSWORD '*244733929909A95DDF1A7F78DD067589B4092EE7' |
| GRANT ALL PRIVILEGES ON `nagiosql`.* TO 'nagiosql'@'localhost' WITH GRANT OPTION |
+-----------------------------------------------------------------------------------------------------------------+
2 rows in set (0.01 sec)
sib
Posts: 111 Joined: Thu Dec 11, 2014 8:06 am
Post
by sib » Mon Oct 10, 2016 11:16 am
avandemore
Posts: 1597 Joined: Tue Sep 27, 2016 4:57 pm
Post
by avandemore » Mon Oct 10, 2016 11:47 am
sib,
Please let us know if that resolved your issue after you've had the time to test. Thanks for using the Nagios forums!
Previous Nagios employee
sib
Posts: 111 Joined: Thu Dec 11, 2014 8:06 am
Post
by sib » Tue Oct 11, 2016 2:29 am
Hi
The solution said to change a line but it was already changed to that
Code: Select all
# Update nagiosql database structure (session locking / negation)
mysql -h $cfg__db_info__nagiosql__dbserver -u $cfg__db_info__nagiosql__user --password="$cfg__db_info__nagiosql__pwd" --database=$cfg__db_info__nagiosql__db < subcomponents/nagiosql/mods/schema_01.sql
sib
Posts: 111 Joined: Thu Dec 11, 2014 8:06 am
Post
by sib » Tue Oct 11, 2016 2:53 am
Ok. I got a bit further. But now I am stuck with
Code: Select all
OUTPUT:
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Template 'use' specified in host definition could not be not found (config file '/usr/local/nagios/etc/hosttemplates.cfg', starting on line 378)
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.
RET: 1
No log handling enabled - turning on stderr logging
This is the output of the hosttemplates.cfg
Code: Select all
###############################################################################
#
# Host template configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date: 2016-10-11 08:00:58
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define host {
name BIS_corpsec
alias Default Host
hostgroups corpsec
check_command check-host-alive
initial_state u
max_check_attempts 5
check_interval 1
retry_interval 1
check_period 24x7
event_handler_enabled 1
flap_detection_enabled 0
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
contacts Linux Team E-Mail,Linux Team SMS
notification_interval 0
notification_period 24x7
notification_options d,u,r,
notifications_enabled 1
icon_image redhat.png
statusmap_image redhat.png
register 0
}
define host {
name BIS_dev_host
alias Default Host
hostgroups devua
check_command check-host-alive
initial_state u
max_check_attempts 1
check_interval 5
retry_interval 1
check_period 24x7
event_handler_enabled 1
flap_detection_enabled 0
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
contacts Linux Team E-Mail
notification_interval 0
notification_period 24x7
notification_options d,u,r,
notifications_enabled 1
icon_image redhat.png
statusmap_image redhat.png
register 0
}
define host {
name BIS_Package
alias Default Package
hostgroups all
check_command check-host-alive
initial_state u
max_check_attempts 5
check_interval 1
retry_interval 1
check_period 24x7
event_handler_enabled 1
flap_detection_enabled 0
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
contacts Linux Team E-Mail,Linux Team SMS
notification_interval 0
notification_period 24x7
notification_options d,u,r,
notifications_enabled 1
icon_image package.png
statusmap_image package.png
register 0
}
define host {
name BIS_prod_host
alias Default Host
hostgroups prod
check_command check-host-alive
initial_state u
max_check_attempts 5
check_interval 1
retry_interval 1
check_period 24x7
event_handler_enabled 1
flap_detection_enabled 0
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
contacts Linux Team E-Mail,Linux Team SMS
notification_interval 0
notification_period 24x7
notification_options d,u,r,
notifications_enabled 1
icon_image redhat.png
statusmap_image redhat.png
register 0
}
###############################################################################
#
# Check command configuration file
#
# END OF FILE
#
###############################################################################
avandemore
Posts: 1597 Joined: Tue Sep 27, 2016 4:57 pm
Post
by avandemore » Tue Oct 11, 2016 10:29 am
Please zip up "/usr/local/nagios/etc/" directory and PM the zip file to myself or another Nagios support team member.
Previous Nagios employee
sib
Posts: 111 Joined: Thu Dec 11, 2014 8:06 am
Post
by sib » Tue Oct 18, 2016 3:53 am
Hi
I uploaded the ZIP to you last week.
avandemore
Posts: 1597 Joined: Tue Sep 27, 2016 4:57 pm
Post
by avandemore » Tue Oct 18, 2016 1:47 pm
In XI > Configure > CCM > Host Templates click on the Floppy Disk icon in any row. Please paste the block of code line 378 is in.
Previous Nagios employee
sib
Posts: 111 Joined: Thu Dec 11, 2014 8:06 am
Post
by sib » Wed Oct 19, 2016 2:28 am
Hi
There is no line 378. Maybe because I deactivated the xiwizard templates?
You do not have the required permissions to view the files attached to this post.