Nagios Upgrade from 3.4.5 to 4.0.8

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.
Locked
petronagios
Posts: 28
Joined: Tue Aug 16, 2011 8:02 am

Nagios Upgrade from 3.4.5 to 4.0.8

Post by petronagios »

Hi Please can you help? We have a distributed nagios configuration with two slave and one head node all running nagios core 3.4.5.
I upgraded the slaves to 4.0.8 ok, but when I try to upgrade the head node by following the upgrade instructions 'Upgrading From Previous Nagios 3 or 4 Release' I get the following message, How can I find out what the problem is? we have 100+ cfg files and I'm not sure what to look for?

Many thanks
Steve

[root@etc]#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

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...
Read main config file okay...
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.

[root@etc]#
petronagios
Posts: 28
Joined: Tue Aug 16, 2011 8:02 am

Re: Nagios Upgrade from 3.4.5 to 4.0.8

Post by petronagios »

I found by commenting out part of our escalations.cfg file /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg completed OK!

It looks like nagios4 is having problems with the following definitions, do you know why?

Code: Select all

####  ####
define serviceescalation{
        servicegroup_name       S-servers
        service_description     *
        first_notification      1
        last_notification       2
        notification_interval   0
        escalation_options      w
        escalation_period       workhours
        contacts                xxx,xxx
        }

define serviceescalation{
        servicegroup_name       S-servers
        service_description     *
        first_notification      1
        last_notification       2
        notification_interval   0
        escalation_options      c
        escalation_period       workhours
        contacts                xxx,xxx,xxx
        }
###############################################################
# The two definitions below override the default DUMMY contact.

# ALL CRITICAL SERVICE NOTIFICATIONS - UNIX/LINUX & STORAGE.
define serviceescalation{
        hostgroup_name          all-servers,!tvp-citrix-servers,!tvp-license-servers-WIN,!tvp-xen-servers, \
                                !aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers
        servicegroup_name       *,!S-servers
        service_description     *,!arcSDE9,!prosource_listener,!arcgis_listener, \
                                !prosource_database,!tns-gfafrica, \
                                !gfafrica-DB, \
                                !tns-gfameric, \
                                !gfameric-DB, \
                                !tns-gfasia, \
                                !tns-gfaustra, \
                                !gfaustra-DB, \
                                !tns-gfeurope, \
                                !gfeurope-DB, \
                                !tns-gfglobal, \
                                !gfglobal-DB, \
                                !tns-gfmiddle, \
                                !gfmiddle-DB, \
                                !tns-gfdm, \
                                !gf42-DB, \
                                !gf43-DB, \
                                !gf4411-DB, \
                                !pettech9-DB, \
                                !tellus9-DB, \
                                !tns-tellus9
        last_notification       750
        notification_interval   5
        escalation_options      c,r
        escalation_period       workhours
        contact_groups          first,hUnixs
        }

# ALL CRITICAL SERVICE NOTIFICATIONS - WINDOWS & CITRIX
define serviceescalation{
        hostgroup_name          citrix-servers,license-servers-WIN,windows-servers,\
                                global-license-servers, xen-servers,usb-hubs, \
                                vmware-servers, xen-tdp-servers,geoportal-servers
        service_description     *
        last_notification       750
        notification_interval   5
        escalation_options      c,r
        escalation_period       workhours
        contact_groups          first,WindowsAdmins
        }

############################################################
# The following two definitions send the first ten WARNING msgs
# to third line, then stop

# WARNING NOTIFICATIONS - LINUX - SERVICE ESCALATIONS
define serviceescalation{
        hostgroup_name          all-servers,!citrix-servers,!license-servers-WIN,!xen-servers, \
                                !aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers
        service_description     *,!Processor Affinity!var
        first_notification      1
        last_notification       10
        notification_interval   10
        escalation_options      w
        escalation_period       workhours
        contact_groups          Unixadmin
        }
define serviceescalation{
        hostgroup_name          all-servers,!citrix-servers,!license-servers-WIN,!xen-servers, \
                                !aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers
        service_description     *,!Processor Affinity,!var
        first_notification      10
        last_notification       11
        notification_interval   0
        escalation_options      w
        escalation_period       workhours
        contact_groups          UnixAdmin
}
# WARNING NOTIFICATIONS - WINDOWS - SERVICE ESCALATIONS
define serviceescalation{
        hostgroup_name          citrix-servers,license-servers-WIN,windows-servers,\
                                global-license-servers, xen-servers,usb-hubs, \
                                vmware-servers, xen-tdp-servers,geoportal-servers, \
                                !aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers
        host_name               node1
        service_description     *,!Processor Affinity
        first_notification      1
        last_notification       10
        notification_interval   10
        escalation_options      w
        escalation_period       workhours
        contact_groups          WinAdmins
        }
define serviceescalation{
        hostgroup_name          citrix-servers,license-servers-WIN,windows-servers,\
                                global-license-servers, xen-servers,usb-hubs, \
                               vmware-servers, xen-tdp-servers,geoportal-servers, \
                                !aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers
        host_name               node1
        service_description     *,!Processor Affinity
        first_notification      10
        last_notification       11
        notification_interval   0
        escalation_options      w
        escalation_period       workhours
        contact_groups          WinAdmin
        }

###########################################################
# The three definitions below escalate CRITICAL SERVICE alterts every 5mins
# through first,second and third 

# NOTIFICATION1 - SERVICE ESCALATIONS
define serviceescalation{
        hostgroup_name          all-servers, \
                                !aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers
        service_description     *
        first_notification      2
        last_notification       10
        notification_interval   5
        escalation_options      c,r
        escalation_period       workhours
        contact_groups          first,second
        }

# NOTIFICATION2 - SERVICE ESCALATIONS
define serviceescalation{
        hostgroup_name          all-servers,!aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers,
        service_description     *
        first_notification      3
        last_notification       10
        notification_interval   5
        escalation_options      c,r
        escalation_period       workhours
        contact_groups          first,second,third
        }

# NOTIFICATION3 - SERVICE ESCALATIONS
define serviceescalation{
        hostgroup_name          all-servers, \
                                !aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers
        service_description     *
        first_notification      4
        last_notification       10
        notification_interval   5
        escalation_options      c,r
        escalation_period       workhours
        contact_groups          first,second,third,fourth
        }

define serviceescalation{
        hostgroup_name          all-servers, \
                                !aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers
        service_description     *
        first_notification      10
        last_notification       10
        notification_interval   0
        escalation_options      c,r
        escalation_period       workhours
        contact_groups          first,second,third,fourth
        }

##########################################################
# HOST escalation definitions

# ALL CRITICAL HOST NOTIFICATIONS - UNIX/LINUX & STORAGE.
define hostescalation{
        hostgroup_name          all-servers,!citrix-servers,!license-servers-WIN,!xen-servers, \
                                !aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers
        first_notification      1
        last_notification       10
        notification_interval   5
        escalation_options      d,u,r
        escalation_period       workhours
        contact_groups          first,UnixAdmin
        }
define hostescalation{
        hostgroup_name          all-servers,!citrix-servers,!license-servers-WIN,!-xen-servers, \
                                !aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers
        first_notification      10
        last_notification       11
        notification_interval   0
        escalation_options      d,u,r
        escalation_period       workhours
        contact_groups          first,UnixAdmin
        }

# ALL CRITICAL HOST NOTIFICATIONS - WINDOWS & CITRIX
define hostescalation{
        hostgroup_name          citrix-servers,license-servers-WIN,windows-servers,\
                                global-license-servers, xen-servers, usb-hubs, \
                                vmware-servers, xen-tdp-servers,geoportal-servers
        first_notification      1
        last_notification       10
        notification_interval   5
        escalation_options      d,u,r
        escalation_period       workhours
        contact_groups          first,WinAdmin
        }
define hostescalation{
        hostgroup_name         citrix-servers,license-servers-WIN,windows-servers,\
                                global-license-servers, xen-servers, usb-hubs, \
                                vmware-servers, xen-tdp-servers,geoportal-servers
        first_notification      10
        last_notification       11
        notification_interval   0
        escalation_options      d,u,r
        escalation_period       workhours
        contact_groups          first,WinAdmin
        }

###########################################################
# The three definitions below escalate Critical, ie DOWN or UNREACHABLE  alterts every 5mins
# through first,second and third line 

# NOTIFICATION1 - HOST ESCALATION
define hostescalation{
        hostgroup_name          all-servers,!citrix-servers,!license-servers-WIN,!xen-servers, \
                                !aberdeen-all-servers, !astana-all-servers, \
                                !brisbane-all-servers, !cairo-all-servers, \
                                !houston-all-servers,  !mumbai-all-servers, \
                                !rio-all-servers,      !santa-cruz-all-servers, \
                                !stavanger-all-servers,!trinidad-all-servers, \
                                !tunisia-all-servers
        first_notification      2
        last_notification       10
        notification_interval   5
        escalation_options      d,u,r
        escalation_period       workhours
        contact_groups          first,second
        }

# NOTIFICATION2 - HOST ESCALATION
define hostescalation{
        hostgroup_name          all-servers, \
                                !astana-keystone-servers,!santa-cruz-keystone-servers, \
                                !tunisia-keystone-servers,!stavanger-keystone-servers, \
                                !cairo-keystone-servers, \
                                !mumbai-keystone-servers,!trinidad-keystone-servers, \
                                !rio-keystone-servers
        first_notification      3
        last_notification       10
        notification_interval   5
        escalation_options      d,u,r
        escalation_period       workhours
        contact_groups          first,second,third
        }

# NOTIFICATION3 - HOST ESCALATION
define hostescalation{
        hostgroup_name          all-servers, \
                                !astana-keystone-servers,!santa-cruz-keystone-servers, \
                                !tunisia-keystone-servers,!stavanger-keystone-servers, \
                                !cairo-keystone-servers, \
                                !mumbai-keystone-servers,!trinidad-keystone-servers, \
                                !rio-keystone-servers
        first_notification      4
        last_notification       10
        notification_interval   5
        escalation_options      d,u,r
        escalation_period       workhours
        contact_groups          first,second,third,fourth
        }

define hostescalation{
        hostgroup_name          all-servers, \
                                !astana-keystone-servers,!santa-cruz-keystone-servers, \
                                !tunisia-keystone-servers,!stavanger-keystone-servers, \
                                !cairo-keystone-servers, \
                                !mumbai-keystone-servers,!trinidad-keystone-servers, \
                                !rio-keystone-servers
        first_notification      10
        last_notification       10
        notification_interval   0
        escalation_options      d,u,r
        escalation_period       workhours
        contact_groups          first,second,third,fourth
        }
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Nagios Upgrade from 3.4.5 to 4.0.8

Post by jolson »

The wildcard in your service_description field sticks out to me. Any chance you could change that to a string, re-run the pre flight check, and let us know the results? Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
petronagios
Posts: 28
Joined: Tue Aug 16, 2011 8:02 am

Re: Nagios Upgrade from 3.4.5 to 4.0.8

Post by petronagios »

Thanks Jolsen that fixed it :D

The preflight checks compile correctly and nagios reloads! I removed the service_description line altogether as the escalation is for a service group I guess it already applies to all the services listed in the group.

Many thanks for the quick reply

Steve.
Locked