Page 1 of 1

Could not add contact to service

Posted: Wed Aug 11, 2021 4:15 am
by Tilburg
Hi When applying configuration i get the following error:

Error: Contact 'snagiosadmin' is not defined anywhere!
Error: Could not add contact 'snagiosadmin' to service (config file '/usr/local/nagios/etc/services/windows-sql-database-vsp005-Archie.cfg', starting on line 151)

I don't have this contact and i have never defined a service to this contact, it could be that someone else had defined it somewhere during my vacation.

We have the nagiosadmin contact i guess someone made a typo but i do not know who.

I Ok so i tried to just manually add 'snagiosadmin' to the contacts and reapplied the config but it still gives me the same error.

i'd like to know how to add this 'snagiosadmin' contact or just fix the typo what ever is quickest.

Re: Could not add contact to service

Posted: Wed Aug 11, 2021 10:06 am
by pbroste
Hello @Tilburg

Thanks for reaching out and would like to review the System Profile from your environment so we can determine where the relationship snagiosadmin is breaking things.

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

Re: Could not add contact to service

Posted: Thu Aug 12, 2021 2:55 am
by Tilburg
Hi,

Quick update,

It seems the account snagiosadmin was deleted the 29th of july. We made a new contactg with the same name, but this did not resolve the issue.

thx,

Rob

Re: Could not add contact to service

Posted: Thu Aug 12, 2021 10:13 am
by pbroste
Hello @Tilburg,

Thanks for following up and providing the System Provide. After review we see that there are imports that are stuck so we would like to clean those up and then "Delete" ==> "Write" ==> "Verify" inside the Core Configuration Manager (CCM).

To start let's manually delete the tmp's we see sitting in the import directory:

Code: Select all

rm -f /usr/local/nagios/etc/import/*
Listed:
  • 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
  • 8: Verify
Please follow up the results,
Perry

Re: Could not add contact to service

Posted: Mon Aug 16, 2021 3:22 am
by Tilburg
Hello Perry,

This seems to have fixed the issue. Thanks you for your guidence! Unless you want more input, this call can be closed

best regards,

Rob