NetXMS Support Forum

English Support => General Support => Topic started by: Egert143 on July 07, 2020, 10:37:04 AM

Title: Bug: Template custom attributes
Post by: Egert143 on July 07, 2020, 10:37:04 AM
Today i noticed a different behavior from NetXms, not sure from what version it started.

Basicly i have template for each logical drive letter: C,D,E etc. In that template, 2 dci is created per drive and one dci is with threshold value "%{dci-DiskFreeGB-C:50}". "dci-DiskFreeGB-C" is inherited from template and by default is empty. So expected behavior was when drive free space is under 50, trigger alert. But today i noticed that when empty "dci-DiskFreeGB-C" is inherited no alerts are triggered. When i set "dci-DiskFreeGB-C" manualy to 50 then it will work. So easy fix right, lets set template inherited value to 50, but for some reason it wount be inherited. Even if i remove node from template and do another config discovery, still no luck. Next i tryed to removed template custom atribute and re add note, from some mysterios place it still auto inherits it.

Any ideas ?
Title: Re: Bug: Template custom attributes
Post by: Filipp Sudanov on July 08, 2020, 05:27:13 PM
The thing is, that empty custom attribute is converted into integer and turns into 0.
Not sure when there were changes in this. But current behavior is actually correct one - if custom attribute exists, but is empty, we treat it as existing and do not apply the default value for threshold. For numeric threshold empty value is converted into 0.
Title: Re: Bug: Template custom attributes
Post by: Egert143 on July 08, 2020, 10:13:25 PM
Out of curiosity, if node inherites custom attribute + value from template and later that value is modified on node, will it return to template value at some point ?
Title: Re: Bug: Template custom attributes
Post by: Victor Kirhenshtein on July 09, 2020, 02:15:58 PM
Only if you'll remove overridden value from node.