CrowPlugins.BEAM.ETS (crow_plugins v0.2.0)

Display the memory size or items of the given ETS tables, in bytes.

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

Configuration

This following configuration options are required:

  • {:tables, nonempty_list(:ets.table())}: A list of tables to instrument.

  • {: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

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
     ]}
  ]