AnsweredAssumed Answered

Javascript calculator - Custom Metric Host on collector

Question asked by Sam on Aug 8, 2013
Latest reply on Aug 21, 2013 by ChristopherClark
I have a js calc which creates a metric with this name:

"SuperDomain|Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual)|Calculated Metrics:Fish"

and does not run on the MoM. It's not throwing any errors, I know it has data as I'm printing it to the log, but it doesn't produce a metric.

This snippet of code:
log.info(generatedMetricsMetricName);
        generatedMetrics++;
log.info(generatedMetrics);
log.info(myF);
        javascriptResultSetHelper.addMetric(generatedMetricsMetricName,
                        parseInt(generatedMetrics),
                        javascriptResultSetHelper.kIntegerFluctuatingCounter,
                        myF);
produces this output:
8/08/13 12:52:30.089 PM BST [INFO] [Harvest Engine Pooled Worker] [Manager.JavaScript|agent_status_binary.js] Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual)|Calculated Metrics:Fish
8/08/13 12:52:30.089 PM BST [INFO] [Harvest Engine Pooled Worker] [Manager.JavaScript|agent_status_binary.js] 51
8/08/13 12:52:30.089 PM BST [INFO] [Harvest Engine Pooled Worker] [Manager.JavaScript|agent_status_binary.js] Frequency: 15 (s)
8/08/13 12:52:30.089 PM BST [INFO] [Harvest Engine Pooled Worker] [Manager.JavaScript|agent_status_binary.js]
Metric added
8/08/13 12:52:30.089 PM BST [INFO] [Harvest Engine Pooled Worker] [Manager.JavaScript|agent_status_binary.js]
So it should be producing a metric too.

I think the problem must be the metric name. Any ideas?

Outcomes