This is a little complicated, please take some time to read. This could benefit many here in the community. Our application has 50 JVMs. First I created a metric grouping then created a calculator to average the metric grouping (screen shot below). The calculator created a new custom metric "Servlets Weighted Avg WebServlet", under Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual). That's the easy part.
The complicated part is I need to use this new custom metric in the custom calculator to produce another new metric. How to get custom metric into custom calculator?
Consider this as load balancing custom calculator. Let's assume servlets represent incoming requests to the jvm. When I create the calculator to average the metric grouping (referenced above), this will give the "overall average" incoming requests per jvm. I'm writing a custom calculator to compare the "current" incoming requests against the "overall average" incoming requests. If this number is too low, we will know the jvm is taking much less load compares to other JVMs. Likewise, if the number is too high, the JVM is taking alot more load than other JVMs.
Please share your ideas and approaches.
//Return false if the script should not run on the MOM.
//should not run on the MOM because the agents exist only in the Collectors.
If MOM is complaining about running the script, ensure to add the function 'runOnMOM", set to 'false', and in move your script and move it to your Collector. If you have multiple Collectors, place a copy on each.
You can grab the metrics and do all of the averages and compares at the MOM or collectors and save yourself this headache.
According to your log entries on MOM, it states you need to run it from a Collector.
Move your calculator to <EM_HOME>/scripts on your Collector and restart the Collector. Monitor the EM log and verify that it loads properly.
How did you get around the warning on the MOM? Did you accomplish this by changing the resulting metric name so that it wasn't saved to one of the agents on a Collector?
@jakbutler, Yes and yes to your second question. I do have to manipulate the resulting metric name so that it is saved on the MOM, not on the Collector.
Regarding to your first question ("How did you get around the warning on the MOM?"), I need to know additional details before I can answer your question on your situation. In your Investigator tree, do you use Domains or everything are under the Superdomain node?
You actually answered both of my questions (the first was just a lead-in for the second, really). To answer yours, however, we do use Domains; only our Admins have access to SuperDomain. Thank you!
SuperDomain/DomainName|Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual) <-- if you're using domains.