I am trying to figure out if there is a way to dynamically create host level macros based on the results of a discovery.
These macros will be used to tune a trigger and I have confirmed this works.
I have the matching host macros "{$TEST.ITEM.1.LOW} {$TEST.ITEM.1.HIGH}" created in the Host Macros section. This works wonderfully.
I am using this as a way to tune (some) individual servers triggers without having to modify the triggers themselves. This means I just go to the host macro section and tweak the values of some macros to get the desired trigger behavior I am looking for.
If we look at the file system discovery example below.
This creates all the triggers with hard coded values for "Problem/Ok" which in most cases works just fine, but if I wanted to make those hard coded values (10/15) something that was easily changed, I would have to disable the original trigger, clone it, enable the clone, and then modify the values.
It really isn't a problem fixing the trigger creation part of the discovery process,
But rather the creation of the two host macros "{${#FSNAME}.LIMIT.LOW} and {${#FSNAME}.LIMIT.HIGH}".
I realize that this may be kinda odd, but the scale I am trying to gear up to deploy to and more importantly, for me to make it as easy as possible for others to make changes to some of the triggers that we often have to modify without having to clone/unlink/disable triggers that were generated by a discovery would make life a lot easier for me.
Has anyone tried something like this and found a solution by chance?
Thank you
Carl Slaughter
These macros will be used to tune a trigger and I have confirmed this works.
Code:
Problem: {[URL="http://172.18.22.37/items.php?form=update&itemid=73317"]202719lpadaptec.mhsl.test.local:test.item.1[/URL].[B]last([/B][B])[/B]}<{$TEST.ITEM.1.LOW}
Recovery: {[URL="http://172.18.22.37/items.php?form=update&itemid=73317"]202719lpadaptec.mhsl.test.local:test.item.1[/URL].[B]last([/B][B])[/B]}>{$TEST.ITEM.1.HIGH}
I am using this as a way to tune (some) individual servers triggers without having to modify the triggers themselves. This means I just go to the host macro section and tweak the values of some macros to get the desired trigger behavior I am looking for.
If we look at the file system discovery example below.
Code:
Problem: {[URL="http://172.18.22.37/disc_prototypes.php?form=update&itemid=60304&parent_discoveryid=60299"]Template Discovery - Disk and Filesystem:vfs.fs.size[{#FSNAME},pfree][/URL].[B]last([/B][B])[/B]}<10
Recovery: {[URL="http://172.18.22.37/disc_prototypes.php?form=update&itemid=60304&parent_discoveryid=60299"]Template Discovery - Disk and Filesystem:vfs.fs.size[{#FSNAME},pfree][/URL].[B]last([/B][B])[/B]}>15
It really isn't a problem fixing the trigger creation part of the discovery process,
Code:
Problem: {[URL="http://172.18.22.37/disc_prototypes.php?form=update&itemid=60304&parent_discoveryid=60299"]Template Discovery - Disk and Filesystem:vfs.fs.size[{#FSNAME},pfree][/URL].[B]last([/B][B])[/B]}<{${#FSNAME}.LIMIT.LOW}
Recovery: {[URL="http://172.18.22.37/disc_prototypes.php?form=update&itemid=60304&parent_discoveryid=60299"]Template Discovery - Disk and Filesystem:vfs.fs.size[{#FSNAME},pfree][/URL].[B]last([/B][B])[/B]}>{${#FSNAME}.LIMIT.HIGH}
I realize that this may be kinda odd, but the scale I am trying to gear up to deploy to and more importantly, for me to make it as easy as possible for others to make changes to some of the triggers that we often have to modify without having to clone/unlink/disable triggers that were generated by a discovery would make life a lot easier for me.
Has anyone tried something like this and found a solution by chance?
Thank you
Carl Slaughter
Comment