Hello forum,
I need to assign different macros to hosts with certain mountpoints/filesystems.
Let me explain.
I use the default template for filesystem discovery "Linux filesystems by Zabbix agent active" right now.
Now I have hosts that have certain applications with mounted FS like these:
/u123/something/else
/u456/something/else
/u789/something/else
etc. always in the pattern of /u\d\d\d.+
Those hosts I want to assign a macro like {$APP_CODE} -> 12345
Then I have other applications with mountpoints like
/fancyApp/something/other
/fancyApp/somehting/different
etc, so the pattern is /fancyApp/.+
Those host I want to assign a macro like {$APP_CODE} -> 45678
Is there a smart way to do this? I was thinking about excluding the above pattern from the default filesystem discovery template and
create two new discovery templates in which I use these patterns to discover mountpoints, but the builtin item key cannot be reused.
Any ideas on how I can do this?
Thanks alot!
edit: could this be done with a linked template maybe? I exclude the /u\d\d\d.+ from discovery in the main, original fs discovery template?
But then again, I would need a different item key, wouldn't i? Hmmmm
I need to assign different macros to hosts with certain mountpoints/filesystems.
Let me explain.
I use the default template for filesystem discovery "Linux filesystems by Zabbix agent active" right now.
Now I have hosts that have certain applications with mounted FS like these:
/u123/something/else
/u456/something/else
/u789/something/else
etc. always in the pattern of /u\d\d\d.+
Those hosts I want to assign a macro like {$APP_CODE} -> 12345
Then I have other applications with mountpoints like
/fancyApp/something/other
/fancyApp/somehting/different
etc, so the pattern is /fancyApp/.+
Those host I want to assign a macro like {$APP_CODE} -> 45678
Is there a smart way to do this? I was thinking about excluding the above pattern from the default filesystem discovery template and
create two new discovery templates in which I use these patterns to discover mountpoints, but the builtin item key cannot be reused.
Any ideas on how I can do this?
Thanks alot!
edit: could this be done with a linked template maybe? I exclude the /u\d\d\d.+ from discovery in the main, original fs discovery template?
But then again, I would need a different item key, wouldn't i? Hmmmm
Comment