Upgrade Issue Due to Config Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rpearson
Posts: 39
Joined: Fri Dec 14, 2018 5:21 pm

Upgrade Issue Due to Config Error

Post by rpearson »

Error: Template '' specified in contact definition could not be not found (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 98)

I went to the config file and looked at line 98 but didn't see anything out of the ordinary.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Upgrade Issue Due to Config Error

Post by pbroste »

Hello @rpearson

Thanks for reaching out, and sounds like there is something wonky going on with contact config, and want to start off by going through the database repair and then a reindex.
[*]Reindex the Core Configuration Manager (CCM) configs[/*]
  • rm -rf /usr/local/nagios/etc/import/*
  • 1: Terminal command list all running /bin/nagios -> ps -aux | grep -E '/bin/nagios'
  • 2: Terminal command -> killall -9 nagios (or pkill nagios)
  • 3: Terminal command check to see if /bin/nagios processes are stopped
  • 4: Restart nagios.service by terminal command: systemctl restart nagios
  • 5: Head over to the Nagios XI web console ==> Core Configuration Manager (CCM) ==> Config File Management ==> [Delete Files] ==> [Write Files] ==> [Verify Files]
  • 6: Core Configuration Manager (CCM) ==> Under Quick Tools ==> "Apply Configuration"
  • 7: Restart nagios.service by terminal command: systemctl restart nagios
  • [list]
  • Code: Select all

    systemctl restart nagios
[/list]

[*]verify that the host and services look good and verify that there are no errors in core by:[/*]

  • Code: Select all

    /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
[/list]

Please PM your updated system profile for us to review.

To send us your system profile.
  • Login to the Nagios XI GUI using a web browser.
  • Click the "Admin" > "System Profile" Menu
  • Click the "Download Profile" button
  • Save the profile.zip file and send via Private Message
Thanks,
Perry
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Upgrade Issue Due to Config Error

Post by pbroste »

Hello @rpearson

Thanks for uploading the System Profile, after review we see that the contact config in the database and in the contact.cfg both look good and we don't see anything out of place.

Typically when we see this it is a template issue; so next steps, I would want to have you hit and update all fields in the 'Contact Management' in the Core Configuration Manager for Contact name: mam****rn. Under [Manage Contact Templates]; take the time to remove and add. Save/Update and then Apply Configs.

Let us know the results,
Perry
rpearson
Posts: 39
Joined: Fri Dec 14, 2018 5:21 pm

Re: Upgrade Issue Due to Config Error

Post by rpearson »

I tried removing and adding the template clearing files in Config file management. I even tried removing the user still getting that same error. What else can I do? I have a couple of other nagging issues I can't fix until I can save my config once again.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Upgrade Issue Due to Config Error

Post by pbroste »

Hello @rpearson

What do you see when:
  • Code: Select all

    /usr/local/nagios/bin/nagios -vvv /usr/local/nagios/etc/nagios.cfg
[/list]

Please let me know how that looks,
Perry
rpearson
Posts: 39
Joined: Fri Dec 14, 2018 5:21 pm

Re: Upgrade Issue Due to Config Error

Post by rpearson »

Checking objects...
Checked 371 services.
Warning: Host 'vmh1' has no services associated with it!
Warning: Host 'vmh2' has no services associated with it!
Warning: Host 'vmh3' has no services associated with it!
Warning: Host 'vmh4' has no services associated with it!
Warning: Host 'wl-north' has no services associated with it!
Warning: Host 'wl-south' has no services associated with it!
Checked 44 hosts.
Checked 17 host groups.
Checked 6 service groups.
Checked 15 contacts.
Checked 2 contact groups.
Checked 300 commands.
Checked 17 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 44 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 17 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 6
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Upgrade Issue Due to Config Error

Post by pbroste »

Hello @rpearson

Seems like it should go, let's look at the upgrade.log (/usr/local/nagiosxi/tmp/upgrade.log) to see if there is more information on what is going on.

let's run this to get the line that it is failing on:

Code: Select all

bash -v -x /usr/local/nagiosxi/scripts/upgrade_to_latest.sh
Please PM me the output and the upgrade.log so we can see exactly where it is failing.

Thanks,
Perry
rpearson
Posts: 39
Joined: Fri Dec 14, 2018 5:21 pm

Re: Upgrade Issue Due to Config Error

Post by rpearson »

I got this resolved. There was a bad contact template assigned.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Upgrade Issue Due to Config Error

Post by pbroste »

Hello @rpearson

Thanks for following up and letting us know what you did to resolve the issue. Will go ahead and lock this in a couple of days if we don't hear anything further.

Thanks,
Perry
Locked