SignalFx provides powerful analytics so that you can look at the right data when making a decision, rather than drowning in noise. At the end of this tutorial, you will understand how to clone a plot and how to use mathematical expressions to construct a metric for load balancing effectiveness.
This tutorial is based on sample data that is being sent into trials created after May 28, 2015. If your trial or organization was created before that, then this does not apply.
This document assumes you know how to create a chart in SignalFx, apply one or more analytics functions, and save a chart to a dashboard. You can learn how to do that by reviewing Welcome to SignalFx - Part 1, Chart 1.
For alternative ways to construct load balancing ratios, see Best practices for monitoring elastic applications.
Create a chart and choose your metric
To get started, create a new chart and choose the transaction count metric, demo.trans.count, from among the three metrics we are sending to your organization:
Apply the mean:aggregation analytics function to get a single time series.
Clone a plot
Next, select the plot actions menu and select clone.
Although there are now two plots - A and B - you should still see one line, because the clone will be directly on top of the original.
Modify the cloned plot
We want to change the analytics function for the plot B to be the standard deviation rather than the mean, so click on the x in the Mean function to get rid of it, then add the Standard Deviation:Aggregation function in its place.
Construct the load balancing effectiveness ratio
One way of determining the effectiveness of a load balancer is to look at the ratio of its standard deviation to its mean (also known as the coefficient of variation). Now that we have one plot for each of those, we merely need to use SignalFx’s ability to create mathematical expressions to calculate that ratio.
To do this, click in to the enter signal field below plot B, then enter 'B/A'.
This will create a third plot, C, which is the ratio we wanted. Note that it is barely visible in the chart given how much room (in terms of the y-axis scale) plots A and B take in the chart. To focus on C, we can de-select the visibility controls (the eye icons to the left of the plot labels) for A and B.
Annotate your chart
You will notice that the label for C is not very informative by default - it will merely show the formula you input, 'B/A'. To make it more understandable, click on the pencil icon next to the plot label C and choose an appropriate label, e.g. ‘load balancing ratio’.
Now that you have your metrics displaying properly, it’s time to annotate it so that your chart will be identifiable in the dashboard by other people who see it. To add a chart name and description, click into the Chart Name field and change it to something concise and descriptive, like ‘Load balancing effectiveness’, then click into the Chart description field to provide more information.
Save your chart
To save, click on the Save and Close button in the upper right hand corner. You may need to scroll down on the dashboard to see it. Of course, you can always drag on the upper right hand corner of a chart to move it within the dashboard.
And that's it!