CrowPlugins.BEAM.ETS (crow_plugins v0.2.1)

Display the memory size or item count of the given ETS tables.

Graph values will be named according to the table title as returned from :ets.info(tab, :name). This allows unnamed tables to be monitored as well.

Configuration

This following configuration options are required:

  • {:tables, nonempty_list(:ets.table())}: A list of tables to instrument. Tables will be instrumented in the order they appear here. This also affects the order of the tables in the output.

  • {:mode, :memory | :items}: Whether to monitor the memory usage or amount of items in the given tables. Note that the name is changed automatically, and you can re-use the name if you are monitoring the same table#s memory and items separately.

The following configuration options are optional:

  • {:name, nonempty_charlist()}: A custom name to identify this module with, appended after the base name.

  • {:title, nonempty_charlist()}: A custom title to use for graphing the module, appended after the base title. If the :name option is provided but this setting isn't, the name will be used.

Example

To monitor the memory usage of the tables exposed by nostrum's ETS caches, one could use:

config :crow,
  plugins: [
    {CrowPlugins.BEAM.ETS,
     name: 'nostrum_caches',
     mode: :memory,
     tables: [
       :nostrum_guilds,
       :nostrum_members,
       :nostrum_users
     ]}
  ]