DCI Template manual override
-
Hi Victor
I am a bit of a noob with custom attributes etc. So let me explain what I used before. I have a voltage threshold on the template of 22v. But I have a lot of nodes that require a threshold of 25v, some 23.5, etc( a few different values depending on voltage full state). So in the older version, I simply changed it so that those templates are over ridden, and it worked. I am not the only administrator, so I would like to keep it as simple as possible.
So can a template be added that can be over ridden, or should I add multiple DCI's with different thresholds, and maybe disable the ones I dont want / need ? Alternatively, I should remove the template and add them one by one, which seems counter-intuitive.
Let me know on your thoughts,
Thanks -
-
Hi - but what about new nodes that needed to get the template values ? The template adds about 5 DCI's, of which one needs to be adapted. I think I will just duplicate on each of the custom nodes, and disable the one from the template.
-
Hi,
you can change threshold to script like this:
v = GetCustomAttribute($node, "VoltageThreshold"); return $1 < ((v != null) ? v : 22);then threshold will fire if voltage is less than 22 unless you have custom attribute VoltageThreshold set on a node - in that case it will compare current value with value of this attribute. So if you need to override threshold to fire if below 25v on specific node, go to that node properties, page "Custom Attributes", and add attribute VoltageThreshold with value 25.
Best regards,
Victor -
Hi Victor
Could you possibly just explain where I add the custom attributes ? To each node that the default threshold has to be overwritten ? And do I add this on the DCC where the default values currently are ? I apologise again for not seeing this clearly...
-
Hi
Another thing - lets say I have 5 DCI's in the template (This is for Mikrotik), but I have a node that cannot process one of those DCI's (no voltage for eg) - if I disable it, the Template adds it again ? Can this be avoided somehow ?
Thank you -
Hi,
yes, idea is that you add this attribute on each node where default threshold value should be overridden. You cannot exclude certain DCIs from being applied as part of template.
Best regards,
Victor -
-
Hi,
you may need to use instance discovery.
Best regards,
Victor -
-
You will probably need to do something similar to what's been discussed in this post:
https://www.netxms.org/forum/general-support/simple-question-cdm-monitoring-using-snmp-anybody-doing-this/15/Bascially, you will need to use a combination of script thresholds and custom attributes so you can override your default thresholds.
-
As per Tursiops and Victor, the Windows template example that I uploaded deals with both customized DCI thresholds with three variations, as well as dropping DCI's for instances not wanted.
For instance exclusion, there is probably a better way, but basically, you can either do the DCI exclusion in the automatic bind coding - I do it there because it globally applies and it would be cleaner to have different templates for devices based on different firmware / software levels that do / do not support all the DCI's. You might have two templates - Microtik with Voltage and Microtik no voltage - selected based on whatever determines that voltage is expected to be returned (Poll the voltage or set a system attribute somewhere - volt_sensor_installed).
Having said that, I use the same global thresholds for Windows and Linux - all variants. I can override per node, and have set global thresholds for things like /var and C:\ - mixing and matching as needed. The only real difference is that Windows devices node specific override is first three chars whereas Linux is full instance name match.
It took me some time to get my head around this - plus the invaluable assistance from Tursiops and Victor - but it is all there and is all working. When I get time (hahaha), I will write up a "how to" for this as there are a few different components that need to be aligned in order for this to work.
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login