Plugins
- Last Updated 11/18/2020, 1:59:25 PM UTC
- About 2 min read
Plugins are configurable programs which run on agents. There exist two types of plugins:
- Collectors collect monitoring data (telemetry) in terms of metrics and events
- Actions execute actions in response to events generated by other plugins. Actions may also generate events in response to action executions
Plugin programs and plugin configurations are hosted on git
servers and are automatically downloaded by agents on demand. Once a plugin and associated
configuration have been downloaded, the agent will watch for changes made to them and automatically download and use their new versions.
# Plugin program locations
- Collectors:
<catalog home>/bin/eventors/<os>-<arch>/
- Actions :
<catalog home>/bin/actions/<os>-<arch>/
# Plugin configuration file locations
- Collectors:
<catalog home>/assets/collectors/tasks/conf
- Actions:
<catalog home>/assets/collectors/tasks/conf
# Using plugins
# Collectors
Collectors are run by the agent based on a schedule and a configuration. You can run the same plugin with different configurations and schedules.
The configuration is provided to the plugin as yaml
file in git
. Consult the plugin docs for its configuration syntax. To create or modify a configuration,
clone the git
repo and locate or create the configuration file with any path under <catalog home>/assets/collectors/tasks/conf/
. Once the configuration file is ready commit
and push
to the repo.
The agent will automatically pick up the configuration file.
# Actions
Action plugins subscribe to events generated by other plugins and the agent automatically routes these events to them on demand.
As such, no schedule is applicable for these plugins and are deployed using a single configuration file. The configuration procedure is the same as for collectors but
the system expects the configuration file to exist under <catalog home>/assets/collectors/tasks/conf
.
# Running plugins as standalone programs
Plugin programs can be executed outside the agent system scope just like any other program. Run plugins 'manually' to test them or validate configuration files. You may even run plugins outside of the agent system as standalone servers, collecting metrics or executing actions without the use of an agent.
Plugin CLI Usage
Use the --help
switch on any plugin program to show the available flags and commands.
To attach to an agent while in standalone mode run with flags:
--agent
, path to agent socket. For windows this is/run/myrmex-agent-local.sock
, while for linux${MYRMEX_HOME}/run/myrmex-agent-local.sock
--certs
, path to certs directory.${MYRMEX_HOME}/auto-mtls