Mobius.Charts (mobius v0.2.0) View Source

Module for plotting and reporting about metric data

Link to this section Summary

Types

Options to use when plotting time series metric data

Functions

Get the current metric information

Plot the metric name to the screen

Link to this section Types

Specs

plot_opt() :: {:resolution, Mobius.resolution()} | {:name, Mobius.name()}

Options to use when plotting time series metric data

  • :resolution - at what time scale you want to see the past event (default :minute)
  • :name - the name of the Mobius instance you are using. Unless you specified this in your configuration you should be safe to allow this option to default, which is :mobius_metrics.

Link to this section Functions

Specs

info(Mobius.name() | nil) :: :ok

Get the current metric information

If you configured Mobius to use a different name then you can pass in your custom name to ensure Mobius requests the metrics from the right place.

Link to this function

plot(metric_name, tags \\ %{}, opts \\ [])

View Source

Specs

plot(binary(), map(), [plot_opt()]) :: :ok

Plot the metric name to the screen

If there are tags for the metric you can pass those in the second argument:

Mobius.Charts.plot("vm.memory.total", %{some: :tag})

Optionally you can pass in a resolution to see the metrics recorded over time specified by the resolution.

Mobius.Charts.plot("vm.memory.total", %{}, resolution: :hour)

By default the resolution is :minute, which will display the metrics over the last minute.