Empty Relations

Kumar38
Kilo Sage

How do we debug empty Relations in CI Relationships [cmdb_rel_ci] , where Parent = Null , Child = Null or both .

Tried running discovery on similar relation types to figure out which sensor/Script Include is creating Relations. Mostly its " Depends on:: Used by " with empty Child and different Parents and I searched for "Script contains "Depends on::used by or its SYS ID" in sensors, Script Include and noticed there are 3 sensors and 2 Script Include Scripts using them ..

4 REPLIES 4

DaveHertel
Kilo Sage
Kilo Sage
If references to CIs (parents or children) are null, I wonder ifsomeone has deleted the CIs manually and the relation ship records aren't getting deleted too. Disco doesn't usually create empty relation ship records...

Hi,

If I delete Parent or Child the whole relation record is getting deleted. There is other scenario where only Relation Type is getting displayed .

 

find_real_file.png

 

Yep, I understand.  I've seen this (long time ago...) perhaps a biz rule on the relationship table isn't quite right... allowing invalid records to stick around when they should be auto-deleted when parent or child is deleted.

 

Are you sure that new discovery job runs are allowing these bad relationship to be created?  add the created date & By fields to the list view to see whom/when created/updated

 

Yes, Discovery is Creating them . I see few of them have their Classes not empty , which Implies there is record with  no name.

But for  records with either no Parent class or child class its hard to debug. 

Most of these relation records are created and Updated on same day.