This works for us....
This works for us:
A. Create Template_Base_Tomcat
B. Create Item "log[{$TOMCAT_LOG}].....and all other things needed in BASE template using macros
C. Create Template_MYTOMCAT_App1
D: Link Template_Base_Tomcat in Template_MYTOMCAT_App1
E. Create Macro in Template_MYTOMCAT1_App called {$TOMCAT_LOG} = /home/app/logs/catalina.out ....and other macros....
F: Attach Template_MYTOMCAT_App1 to ALL hosts in this app pool
You can extend step E to include other macros that you used in other base templates (such as OS or Hardware) that you either link to the App template or directly to the host.
I should note this falls apart if you end up with two macros/keys of the same name on the same host (i.e. TWO App templates sharing the same base template on one host), but you can get around this by adding a second or third identical base template with different key and macros names.
Repeat steps C-F for each app monitored.
We've also taken this a few steps further with auto discovery and discovery actions. Based on a UserParamater that is added to each host during agent install (RPM post script or VBScript), we automatically assign an app template and base OS templates. We manage all hosts with templates making it very scalable for us (over 1500 hosts right now and we only just begun rolling it out in prod last week).
This works for us:
A. Create Template_Base_Tomcat
B. Create Item "log[{$TOMCAT_LOG}].....and all other things needed in BASE template using macros
C. Create Template_MYTOMCAT_App1
D: Link Template_Base_Tomcat in Template_MYTOMCAT_App1
E. Create Macro in Template_MYTOMCAT1_App called {$TOMCAT_LOG} = /home/app/logs/catalina.out ....and other macros....
F: Attach Template_MYTOMCAT_App1 to ALL hosts in this app pool
You can extend step E to include other macros that you used in other base templates (such as OS or Hardware) that you either link to the App template or directly to the host.
I should note this falls apart if you end up with two macros/keys of the same name on the same host (i.e. TWO App templates sharing the same base template on one host), but you can get around this by adding a second or third identical base template with different key and macros names.
Repeat steps C-F for each app monitored.
We've also taken this a few steps further with auto discovery and discovery actions. Based on a UserParamater that is added to each host during agent install (RPM post script or VBScript), we automatically assign an app template and base OS templates. We manage all hosts with templates making it very scalable for us (over 1500 hosts right now and we only just begun rolling it out in prod last week).
Comment