Relation to tbl_host, entry - deletion not possible??

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
QS1
Posts: 195
Joined: Tue Sep 21, 2010 3:30 pm

Relation to tbl_host, entry - deletion not possible??

Post by QS1 »

I have a few contacts that I am trying to delete but cannot because of this entry. Relation to tbl_host, entry - deletion not possible??
It doesn't show a host or anything so I am unsure which one is causing the problem.
I don't have any blank host ... any suggestions ?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Relation to tbl_host, entry - deletion not possible??

Post by mguthrie »

This just means that the contact that you're trying to delete is defined as the contact for one or more hosts. You'll need to remove that person as a contact from the host configuration before you can delete the contact profile. This is to prevent an error when you attempt to Apply Configuration.
QS1
Posts: 195
Joined: Tue Sep 21, 2010 3:30 pm

Re: Relation to tbl_host, entry - deletion not possible??

Post by QS1 »

mguthrie wrote:This just means that the contact that you're trying to delete is defined as the contact for one or more hosts. You'll need to remove that person as a contact from the host configuration before you can delete the contact profile. This is to prevent an error when you attempt to Apply Configuration.

Right, but it doesn't tell me what host. Some of them do. But this one just says tbl_host, entry.
Others actually tell me which host the contact is attached to.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Relation to tbl_host, entry - deletion not possible??

Post by mguthrie »

The orange 'info' icon next to the contact will display the table relationships.
QS1
Posts: 195
Joined: Tue Sep 21, 2010 3:30 pm

Re: Relation to tbl_host, entry - deletion not possible??

Post by QS1 »

mguthrie wrote:The orange 'info' icon next to the contact will display the table relationships.
Right, but it just says this:
Entry cannot be activated because it is used by another configuration:

Relation to tbl_contactgroup, entry ITSQL Group - deletion not possible
Relation to tbl_contacttemplate, entry xi_contact_generic - deletion possible
Relation to tbl_host, entry - deletion not possible
Relation to tbl_host, entry SDC Data Center Temp - deletion possible



What host is that one?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Relation to tbl_host, entry - deletion not possible??

Post by mguthrie »

I'm not sure about the blank host entry, but I would remove the contact from 'SDC Data Center Temp' as well as the 'ITSQL Group' and then see if you can delete or if it gives you more information.
QS1
Posts: 195
Joined: Tue Sep 21, 2010 3:30 pm

Re: Relation to tbl_host, entry - deletion not possible??

Post by QS1 »

mguthrie wrote:I'm not sure about the blank host entry, but I would remove the contact from 'SDC Data Center Temp' as well as the 'ITSQL Group' and then see if you can delete or if it gives you more information.
Yeah i did, and all is shows is the blank host.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Relation to tbl_host, entry - deletion not possible??

Post by mguthrie »

I'd do a grep command to find out which host as that person as the contact. I'm still not sure why it's showing a blank name, but that's something we'll have to keep an eye out for. I'm not able to reproduce that as of yet.

Replace 'contactname' with the contact you're trying to delete:

Code: Select all

cd /usr/local/nagios/etc/hosts
grep -n 'contactname'  *   
This should return anywhere that contact is assigned to a host.

Code: Select all

[root@localhost hosts]# grep -n 'nagiosadmin' *
CNN.cfg:22:     contacts                        nagiosadmin
Note: Changes in the Core Config Manager don't show up in the config files until you Apply Configuration, so if you've got some working changes that haven't been applied, they may not be seen yet in the config files.
QS1
Posts: 195
Joined: Tue Sep 21, 2010 3:30 pm

Re: Relation to tbl_host, entry - deletion not possible??

Post by QS1 »

mguthrie wrote:I'd do a grep command to find out which host as that person as the contact. I'm still not sure why it's showing a blank name, but that's something we'll have to keep an eye out for. I'm not able to reproduce that as of yet.

Replace 'contactname' with the contact you're trying to delete:

Code: Select all

cd /usr/local/nagios/etc/hosts
grep -n 'contactname'  *   
This should return anywhere that contact is assigned to a host.

Code: Select all

[root@localhost hosts]# grep -n 'nagiosadmin' *
CNN.cfg:22:     contacts                        nagiosadmin
Note: Changes in the Core Config Manager don't show up in the config files until you Apply Configuration, so if you've got some working changes that haven't been applied, they may not be seen yet in the config files.
Thankyou, i will try this!
Locked