Merging / Combining DCI's

Started by cbwecomm, August 04, 2025, 05:51:57 AM

Previous topic - Next topic

cbwecomm

Templates are GREAT, but, occasionally we realize after the fact there is a "better" way to build something, or we have a new use case that requires us to split DCI's defined in templates into new templates.  
Currently, we can keep historic data by removing the template, but not removing the DCIs however this isn't really ideal since the graphs are wrong anyhow.  
I was thinking it would be pretty nice if a template would automatically merge two DCI's based on identical matching names and other fields.   This could be enabled or disabled somehow in the configuration, just in case someone didn't want this behavior.     I think the DCI's would need to match identically, 100%... as would be the case when you copy or move DCI's between templates. 
If something doesn't match, then they wouldn't merge and a new one would be created.   If that happened accidentally, say for instance if you copied a DCI to a new template and then changed the name and then applied it.... then you could fix this by manually merging the DCI's (after you fixed the name change on the old one), by multi-selecting the two of them, right clicking, and then going to "Actions > Merge" or something like that.  

Merging DCI's manually through the menu would do the same thing as the automatic method; it would check to ensure 100% of the configuration fields were the same, and then move the oldest set of data into the newer DCI.   A warning prompt for Yes/No and brief explanation of what will happen wouldn't be a bad idea either.  
Just for simplicity, you could only merge 2 DCIs at a time.  
I'm sure I could poke around in the database and do this in psql... but I'd rather there be an official NetXMS supported method haha :-)