Hi all,
I want to monitor the service calls of an application (the application is running on several machines). The application uses approx. 100 different services. For each service I want to monitor the number of calls as well as the minimum, maximum, and average time the calls take. Those numbers should be captured for successful as well as failed service calls. Altogether there are ~ 100 * 2 * 4 items to measure.
How should these items be organized? Unfortunately it seems that item keys can not depend on user macros. My first approach was to start with a template with 2 user macros named $SERVICE and $OUTCOME. In that template I tried to define keys of the form:
{$SERVICE}_{$OUTCOME}_cnt
{$SERVICE}_{$OUTCOME}_min
{$SERVICE}_{$OUTCOME}_max
{$SERVICE}_{$OUTCOME}_avg
However that did not work. It seems that macros are allowed in the parameter part of keys only. Therefore my second try was to use keys of the form:
cnt[{$SERVICE},{$OUTCOME}]
min[{$SERVICE},{$OUTCOME}]
max[{$SERVICE},{$OUTCOME}]
avg[{$SERVICE},{$OUTCOME}]
Again this did not work because after the template was linked to a "service" template by intermediary "failedOutcome" and "succededOutcome" templates I got the error that
* Template with item key "avg[{$SERVICE},{$OUTCOME}]" already linked to host.
* Template with item key "cnt[{$SERVICE},{$OUTCOME}]" already linked to host.
* Template with item key "max[{$SERVICE},{$OUTCOME}]" already linked to host.
* Template with item key "min[{$SERVICE},{$OUTCOME}]" already linked to host.
The only two possibilities I see right now are:
1. Introduce 100 * 2 "virtual hosts" for each application instance each having 4 items or
2. Create a template with that has 100 * 2 * 4 items
Are these the only options or do I miss something? Which structure is suited better for aggregation and visualization?
TIA
Stefan
I want to monitor the service calls of an application (the application is running on several machines). The application uses approx. 100 different services. For each service I want to monitor the number of calls as well as the minimum, maximum, and average time the calls take. Those numbers should be captured for successful as well as failed service calls. Altogether there are ~ 100 * 2 * 4 items to measure.
How should these items be organized? Unfortunately it seems that item keys can not depend on user macros. My first approach was to start with a template with 2 user macros named $SERVICE and $OUTCOME. In that template I tried to define keys of the form:
{$SERVICE}_{$OUTCOME}_cnt
{$SERVICE}_{$OUTCOME}_min
{$SERVICE}_{$OUTCOME}_max
{$SERVICE}_{$OUTCOME}_avg
However that did not work. It seems that macros are allowed in the parameter part of keys only. Therefore my second try was to use keys of the form:
cnt[{$SERVICE},{$OUTCOME}]
min[{$SERVICE},{$OUTCOME}]
max[{$SERVICE},{$OUTCOME}]
avg[{$SERVICE},{$OUTCOME}]
Again this did not work because after the template was linked to a "service" template by intermediary "failedOutcome" and "succededOutcome" templates I got the error that
* Template with item key "avg[{$SERVICE},{$OUTCOME}]" already linked to host.
* Template with item key "cnt[{$SERVICE},{$OUTCOME}]" already linked to host.
* Template with item key "max[{$SERVICE},{$OUTCOME}]" already linked to host.
* Template with item key "min[{$SERVICE},{$OUTCOME}]" already linked to host.
The only two possibilities I see right now are:
1. Introduce 100 * 2 "virtual hosts" for each application instance each having 4 items or
2. Create a template with that has 100 * 2 * 4 items
Are these the only options or do I miss something? Which structure is suited better for aggregation and visualization?
TIA
Stefan
Comment