upgrade error "Error: Contact 'xi_default_contact' is not de

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
rzietlow
Posts: 43
Joined: Mon Jul 02, 2018 9:25 am

upgrade error "Error: Contact 'xi_default_contact' is not de

Post by rzietlow »

Good Afternoon support

I was attempting to upgrade to the most recent version of the software today and I get the following alert.

Error: Contact 'xi_default_contact' is not defined anywhere!

when I grep the file I see this:

"contacts nagiosadmin,xi_default_contact"

I do have some files where xi_default_contact is the only contact.


My question is, with the contacts line above if I define the xi_default_contact will I get 2 messages (we will make xi_default_contact the same as nagiosadmin) when a service goes down? or not?

I can touch these and delete them out of 24 checks or define it. I just don't want to get 2x the email if the service goes down.



I'm just going to remove the xi_default_contact and redo some of our configs. Is there a tool or something that could do some kind of audit/test/verification? I found a couple services that have no contact, and other than going by hand, I wasn't sure if there was another way to do these verifications.
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: upgrade error "Error: Contact 'xi_default_contact' is no

Post by gsmith »

Hi,

If two contacts are using the same email Nagios is smart enough to only send out one notification.

If you look at /usr/local/nagios/etc/services/localhost.cfg you will be able to see which
services have notifications set and who the contacts are.

Thanks
rzietlow
Posts: 43
Joined: Mon Jul 02, 2018 9:25 am

Re: upgrade error "Error: Contact 'xi_default_contact' is no

Post by rzietlow »

great thank you. I removed all of the ones that had that and did a lot more general cleanup on our systems.

while upgrading I saw this:
Checking objects...
Checked 1084 services.
Warning: Host 'HOST1.<SNIP>.com' has no default contacts or contactgroups defined!
Warning: Host 'HOST2.<SNIP>.com' has no default contacts or contactgroups defined!
Warning: Host 'HOST3.<SNIP>.com' has no default contacts or contactgroups defined!
Checked 185 hosts.


where is this check invoked from? when I recursively greped for "checking objects" in the /tmp/nagiosxi/ dir I couldn't find anything, other than log files, same with /usr/local/ this could be handy for use just to look for things. this was a much better than my grep -c of a define block and a grep -c of contact to ensure the numbers matched up.
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: upgrade error "Error: Contact 'xi_default_contact' is no

Post by gsmith »

Hi,
I am not a developer but I am guessing that the:

Code: Select all

Checking objects...
Checked 1084 services.
Warning: Host 'HOST1.<SNIP>.com' has no default contacts or contactgroups defined!
Warning: Host 'HOST2.<SNIP>.com' has no default contacts or contactgroups defined!
Warning: Host 'HOST3.<SNIP>.com' has no default contacts or contactgroups defined!
Checked 185 hosts.
is part of the check that is done when you hit "Apply Configuration"

It is probably looking at /usr/local/nagios/etc/hosts/localhost.cfg :

Code: Select all

[root@gs-cent8-23-82 hosts]# cat localhost.cfg
###############################################################################
#
# Hosts configuration file
#
# Created by: Nagios CCM 3.1.1
# Date:       2021-04-27 14:33:18
# Version:    Nagios Core 4.x
#
# --- 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 {
    host_name                   localhost
    use                         linux-server
    alias                       localhost
    address                     127.0.0.1
    contacts                    Greg Smith
    notification_interval       5
    notification_period         workhours
    first_notification_delay    0
    notification_options        d,u,r,f,s,
    notifications_enabled       1
    register                    1
}

###############################################################################
#
# Hosts configuration file
#
# END OF FILE
#
###############################
You can run the config check yourself.
Pick from the menu across the top: Configure, Core Config Manager
On the left-hand side expand the "Tools"
Click on "Config File Management"
Hit the red "Delete Files" button. Don't worry, we are going to write those files out in the next step.
Hit the blue "Write Configs" button
Next hit the white "Verify Files" button

Thanks
rzietlow
Posts: 43
Joined: Mon Jul 02, 2018 9:25 am

Re: upgrade error "Error: Contact 'xi_default_contact' is no

Post by rzietlow »

ok I will check this out.

this was part of the script when i followed the upgrade guide and ran the ./upgrade.sh that was linked to from the upgrade command (I don't typically use the GUI for that).
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: upgrade error "Error: Contact 'xi_default_contact' is no

Post by gsmith »

Hi,

Sounds good. We'll keep this open until we hear back from you.

Thanks