- It’s cheep. By default it has no dependenices. You can use it just with plugins that you need them.
- Flexibility
- It’s Pluginable. Each plugin should be an OTP application. Simply write your own plugin as OTP application.
- Configuration
- Have different reader for EMeter configuration parameters. Currently it can use OTP’s application configuration parameters to read config.
- You can write a simple callback module to get whole configuration parameters. (e.g. read them from a file in your desire format)
- Just define shell environment variable EMETER_OVERRIDE_OS_ENV to true and you can set any configuration parameter from shell.
- Have different configuration keeper. Use each one that matches your needs. it can keep them in OTP’s application configuration parameters, a seperated ETS table and a dynamically compiled module. You can also use OTP 22’s persistent_term to keep them if you are using OTP 22^.
- You can write a simple callback module to store them yourself.
- You can change configuration reader or keeper in runtime.
- Have dynamic config reloading and all of your plugins will be reloaded with new configuration (if they want).
- Hooking
- You can use an ETS table, a dynamically compiled module or OTP 22’s persistent_term (if you are using OTP 22^) to keep hooks and their callbacks.
- You can write your own callback module to keep and read hooks.
- Change hook backend dynamically in runtime whenever you want. For example put all hooks from ETS table to persistent_term.
- There are some ready-to-use callback runner for hooks that work in sync and async mode.
- Use OTP’s logger, OTP’s error_logger, well-known lagger, io:format/2 or nothing for logging. You just need to use constant logging macros in your code and use EMETER_LOGGER shell variable to use each one you want.
- Ready-to-use plugins:
- json: json encode/decoder plugin. You can use one backend library (jsx, jsone, jiffy, etc) for encode and another one for decode.
- influxdb: A fast InfluxDB UDP writer. Have different pools of connection with different size connected to different servers. Have whitelist for data being written to InfluxDB servers and filter them.
- opentsdb: A fast OpenTSDB UDP writer. Have different pools of connection with different size connected to different servers. Have whitelist for data being written to InfluxDB servers and filter them.
- graphite: A fast OpenTSDB UDP writer. Have different pools of connection with different size connected to different servers. Have whitelist for data being written to InfluxDB servers and filter them.
- erts: A plugin to collect Erlang RunTime System data. You can define what you want to collect in configuration parameters.
|