Configuration
wombat.config
and sys.config
The main WombatOAM configuration file is rel/wombat/files/wombat.config
. The
following example shows its file format:
1 2 3 4 5 6 7 8 9 |
|
See the "Configuration file format" section below for more information.
Note: After each configuration tuple in wombat.config
, a period (.
) is
needed.
WombatOAM needs to be restarted for the changes in wombat.config
to take an
effect, but no other action (such as regenerating the release) is needed.
The configuration examples in the documentation always apply to wombat.config
(unless specified otherwise).
The default values of the configuration parameters can be found in the
rel/wombat/wombat/releases/<version>/sys.config
file. Modifying this file is
not recommended, since it is generated from rel/wombat/files/sys.config
and
rel/wombat/files/vars
during release generation and thus easily overwritten.
Please note that configuring Wombat with the user.config
file is no longer
supported.
Changing WombatOAM's node name and IP address
WombatOAM runs on 127.0.0.1 by default and uses the wombat@127.0.0.1
node name,
but you can change this behaviour to run WombatOAM on any required IP and using any
node name.
Important: Changing the node name/IP address creates a new empty database.
The new database will be placed in different directories within the wombat
directory. It also overwrites any changes made to sys.config
and vm.args
.
However, it is possible to restore the old database into the new one with the help of the
change_node_name.es and restore_backup.es scripts.
To change the name/IP address (e.g. from 'wombat@127.0.0.1'
to 'wombat@192.168.1.1'
),
please follow these steps:
- To retain the database execute
scripts/change_node_name.es wombat@127.0.0.1 wombat@192.168.1.1
while WombatOAM is running. The script backs up the entire database so it's execution time depends on how many metrics WombatOAM collected so far. - Ensure that WombatOAM is stopped.
- Export the environment variable:
export WOMBAT_NODENAME=wombat@NEW_IP
- [Optional step] If you are moving the WombatOAM installation to a new machine copy
the entire installation in this step. The database is saved in
rel/wombat/wombat
directory so it will be copied along. - Restart WombatOAM with
./wombat start
. - Restore the database by executing
scripts/restore_backup.es mnesia_backup_wombat@192.168.1.1 wombat@192.168.1.1
If WombatOAM's cookie setting was changed from default value, you can specify that
as the optional last argument. For example if the cookie is mycookie
:
scripts/change_node_name.es wombat@127.0.0.1 wombat@192.168.1.1 mycookie
and
scripts/restore_backup.es mnesia_backup_wombat@192.168.1.1 wombat@192.168.1.1 mycookie
Local ports used by WombatOAM
WombatOAM binds to one local port. This can be changed e.g. if another application uses the same port or if you want to run two WombatOAM instances on the same machine. (In the latter case, the node name also needs to be changed; see the previous section.)
- Dashboard HTTP port (default: TCP port 8080): This can be changed in
rel/wombat/files/wombat.config
. Restarting WombatOAM is enough for this change to take an effect.
Logging configuration
The following options can be used to configure logging.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Configuring the web interface
The default web dashboard can be accessed on port 8080 under HTTP.
1 |
|
Change the value of http_port
to the port on which the web dashboard and
REST API should listen.
SSL is disabled by default, nonetheless, it is supported by WombatOAM.
If SSL is enabled, the dashboard uses a self-signed root certificate by default
that is considered 'not trusted' by browsers. If you need to change any related
configuration, you can edit the wombat.config
file.
1 |
|
Change the value of https_port
to the port on which the web dashboard and
REST API should listen.
1 |
|
To disable SSL, change the value of enable_force_ssl
to false
.
1 |
|
To force a Websocket over SSL.
1 |
|
Change the value of cacert
to the absolute path of the file containing PEM
encoded CA certificates (trusted certificates used for verifying a peer
certificate).
1 |
|
Change the value of cert
to the absolute path of the file containing the PEM
encoded user certificate.
1 |
|
Change the value of key
to the absolute path of the file containing the user's
private PEM encoded key.
1 |
|
In order to switch off authentication change the value of enable_authentication
to false
.
1 |
|
In order to change the tags that new users will be created with or
the tags that are used by the REST layer when the authentication is switched
off, change the value of default_user_tags
to either all
or a list of tags
represented as binary strings. If all
is set, all information available in
WombatOAM will be retrieved, otherwise metrics, notifications and alarms that are
not tagged with any of the listed tags will be removed from the results.
Security modes
WombatOAM can run in multiple security modes which present some requirements for its configuration or restrictions in its capabilities.
By default it starts up in Local-only security mode when there are no configuration requirements but usage is restricted to monitor only nodes running on the same host as WombatOAM. The Dashboard and REST interface is also only available on localhost. (All defaults in vm.args and sys.config reflect this mode to help easy trialling.)
When WombatOAM node name is changed to include a hostname or IP address other than the loopback address (see Changing WombatOAM's node name and IP address) WombatOAM will switch to operate in Distributed security mode. In this mode any node can be monitored but certain security settings are required in order to enforce production-level security:
- Authentication must be enabled (It is strongly advised to change the default password of the admin user at first login)
- If HTTPS is enabled certificates must be explicitly configured
- If the Dashboard should be accessible outside a private network and HTTPS is not enabled it is strongly advised to place a proxy (like Apache or NGINX) in front of WombatOAM. (See sections with proxy configuration examples below.)
Sample configurations
This is a sample configuration for Local-only mode turning off both https and authentication:
1 2 3 4 5 6 7 8 |
|
And this is another one for Distributed mode with custom certificates:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Short node names
WombatOAM can manage nodes with long names and short names at the same time. It is not necessary to change the name of the WombatOAM node to manage nodes with short names.
When adding short-named nodes, use the names that are returned by the node()
function, i.e. <short node name>@<host>
where <host>
is the first part of
the host name.
Opening firewall ports
This section describes which ports need to be open if there is a firewall between WombatOAM and the managed nodes.
WombatOAM connects to the managed nodes via Erlang distribution, which needs the port used by EPMD (Erlang Port Mapper Daemon) to be open. EPMD uses TCP port 4369 by default.
You also need to make sure that the Erlang Distribution traffic can flow between WombatOAM and the managed nodes, for which there are two ways:
- Enable all incoming TCP ports from WombatOAM to the managed nodes. (I.e. WombatOAM should be able to open new TCP connections towards the managed nodes.)
- Set a custom TCP port range for Erlang Distribution on the managed nodes, and set those ports in the firewall as incoming ports towards the managed nodes.
Details for the second option: WombatOAM communicates with the managed nodes
via Erlang Distribution. By default, Erlang does not specify any port range to
be used for Erlang Distribution traffic. Instead, Erlang uses the first
available port in the system. This can be changed by configuring the
inet_dist_listen_min
and inet_dist_listen_max
configuration parameters of
the kernel
Erlang application:
1 2 3 4 5 |
|
This modification needs to be performed on the managed nodes. In most Erlang
applications, it can be set in the sys.config
file. In case of
Riak 1.x nodes, this setting can be set in the app.config
file. In
case of Riak 2.x nodes, it can be set in riak.conf
.
Configuring Apache
If you would like to access WombatOAM via Apache as a proxy, the following Apache
configuration file example shows how to forward both the HTTP and the web socket
traffic to WombatOAM. It assumes WombatOAM is listening on 127.0.0.1:8080, and that it
will be accessed under http://<my_server>/wombat/
). The /wombat/
URL path
can be changed by modifying the rules.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Configuring NGINX
If you would like to access WombatOAM via NGINX as a proxy, the following NGINX
configuration file example shows how to forward both the HTTP and the web socket
traffic to WombatOAM. It assumes WombatOAM is listening on 127.0.0.1:8080, and that it
will be accessed under http://<my_server>/
).
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Running WombatOAM in the foreground
Executing ./wombat start
will start the WombatOAM server in the background and return
the prompt. Using ./start-fg.sh
, the WombatOAM server can be started in the
foreground, so that it will not return the prompt, only when the server
terminated. Instead, it will print the error and warning log entries to the
standard output while the WombatOAM server is running. This is useful for example
when running WombatOAM inside a Docker container.
Configuration file format
The configuration entries are organized into a tree. wombat.config
contains a
number of tuples, each of which modifies one leaf or branch of this tree. Leaves
and branches can be replaced (with the set
command) and deleted (with the
unset
command). The elements of the tuple (after the command) specify the path
from the root of the configuration tree towards the leaf or branch to be
modified or deleted. In case of the set
command, the last element of the tuple
is not part of the paths, but it defines the new value for the leaf or branch.
The available commands in wombat.config
are the following:
1 |
|
Sets the value of a given configuration entry to the given value.
1 |
|
Sets a given configuration entry to the given value. The difference between
set
and replace
is that the former sets only the value, while the latter the
entry itself. Compare {set, myapp, myparam, a, 1}
and {replace, myapp,
myparam, a, {a, 1}}
, which perform the same task. The latter can be used to
set not only a pair, but also a longer tuple as a configuration entry.
1 |
|
Deletes the given configuration entry.
Configuration reference
-
wo_dashboard/enable_topo_graph
(boolean()
): Whether the dashboard should show the "View node graph" subtab in the Topology tab. -
wo_rest/http_port
(integer()
): The HTTP port of the REST interface and the Dashboard. -
wo_rest/hide_cookie
(boolean()
): Whether the cookie values of nodes should be hidden on the dashboard and REST interface. Default is false. -
wo_license/license
(string()
): The license key to be use by WombatOAM.
1 |
|
-
wo_core/node_monitor_max_wait
(integer()
): The maximum number of milliseconds that WombatOAM should wait between trying to reconnect to "DOWN" nodes. -
wo_metrics/backend
(mnesia | seq_file
): Specifies which back end to use. -
wo_metrics/gauges
: Specifies what gauges should be visible on the "Metrics/Gauges" tab, and what their minimum and maximum values for different nodes should be. The node names are matched against the specified regular expressions, and the first match is used.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
wo_metrics/graphite
: Configures the connection to Graphite. If not configured, WombatOAM will not push metrics to Graphite.
Example:
1 2 3 |
|
wo_metrics/datadog
: Configures the connection to Datadog. If not configured, WombatOAM will not push metrics to Datadog.
Example:
1 2 3 4 5 |
|
-
wo_metrics/threshold_templates
: Configure templates for threshold based alarms. See details in Threshold based alarms -
wo_metrics/threshold_sets
: Configure rule sets for threshold based alarms. See details in Threshold based alarms -
wo_alarms/repeat_notifications
(boolean()
): If an alarm is raised, WombatOAM sends a notification about it. If this option istrue
, WombatOAM will also send notifications when the alarm is re-raised. You may turn this off if you do not want to get notifications when alarms are re-raised without first being cleared. -
wo_alarms/ignore_missing_module
(string
): The modules matching the given regular expression will not appear in the list of missing modules -
wo_alarms/ignore_different_module_versions
(string
): Nodifferent_module_versions
alarm will be raised for module names which match the given regular expression. -
wo_alarms/ignore_missing_application
(string
): Nomissing_application
alarm will be raised for application names which match the given regular expression. -
wo_alarms/ignore_different_application_versions
(string
): Nodifferent_application_versions
alarm will be raised for application names which match the given regular expression. -
wo_alarms/ignore_different_timezones
(boolean
): Nodifferent_timezones
alarm will be raised if it istrue
. -
wo_plugins/capabilities_period
(integer()
): Specifies the frequency used to retrieve the capabilities from the plugins running on the managed node. Metrics created dynamically on the managed node using Folsom or Exometer will only start appearing on the dashboard after a new capabilities check is performed. -
wo_plugins/sampling_default
: Specifies the retention rules for gathering and keeping metrics from the nodes through the plugins running on the managed node.
The format of the retention rules is similar to the one used by Graphite. For example, "1m:1h" means that that each data point represents 1 minute, and you want to keep enough data points so that they add up to 1 hour of data.
The web interface uses the metrics stored in the first retention period to serve the "last hour" graphs, the second period to serve the "last day" graphs, and the third period to serve the "last week" graph. Note that if you set the second period to keep only the last 12 hours, for example, the first part of the "last day" graph will always be empty.
It is strongly recommended to keep all the 3 metric series. However, you can freely modify the data frequency (the number before the colons).
Example:
1 |
|
This is the default value used for all the plugins, but it is also possible to
specify a value following this format by adding a tuple {sampling, SamplingValue}
to the list of options for the plugin in order to override the default value
for that specific plugin.
wo_plugins/hidden_config_params
: Specifies which configuration parameters to hide. E.g. if you have amyapp
application that has apassword
configuration parameter, and you don't want its value to be shown to the WombatOAM users, you can add the following line towombat.config
:
1 |
|
If you want a plugin to use a different list than the other plugins, that can
be achieved by setting the hidden_config_params
plugin option:
1 2 |
|
wo_plugins/hidden_ets_tables
: Specifies which ETS tables to hide. E.g. if you have an ETS table calledpasswords
, and you don't want its content to be shown to the WombatOAM users, you can add the following line towombat.config
:
1 |
|
If you want a plugin to use a different list than the other plugins, that can
be achieved by setting the hidden_ets_tables
plugin option:
1 |
|
wo_plugins/plugin_action_verbosity
: This is a list that specifies the verbosity level for different plugins. When a plugin starts, sends metrics, etc, we might generate a notification based on the log level that belongs to this action and verbosity configured for the plugin.
Each plugin has a verbosity level and there is also a default verbosity level. The following example configuration will generate plugin notifications for events on a warning level or above for all plugins, except for the builtin_*_metrics plugins, where even debug-level notifications will be generated:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Or, if you manage WombatOAM with WombatOAM, you can open the WombatOAM Dashboard, go to Topology → WombatOAM node → Applications → choose an application → "Set a configuration parameter" → Fill in the following data and click Add:
- "Configuration parameter name":
verbosity
-
"The value to be set":
[{observer_ets, <<"debug">>}]
-
wo_plugins/plugins:
List of configuration items for the plugins that run on the managed node. There must be one configuration item for each available plugin. The configuration elements have the format{PluginName, Apps, ExtraModules, Options}
wherePluginName
is the short name of the plugin,Apps
is the list of OTP applications the plugin depends on (those apps must be running on the managed node for the plugin to start),ExtraModules
is the list of additional modules included in the plugin besides the main module, andOptions
is the list of options specific for that plugin. Within that list of options it is possible to specify the sampling and retention rules specific to a plugin as explained in the previous section.
Regarding the list of Apps
it is either a list or a tuple of two-tuples of the form
{AppName, RegularExpression}
where the regular expression provided is matched using
the functionalities of the Erlang re
module with the application version.
(See Erlang documentation). The plugin will only start when there is a match as
a result of the evaluation. If we intend to match any version of the app, the
".*"
regular expression can be used, as in the following example.
Example:
1 2 3 4 5 6 7 8 |
|
-
wo_orch/private_key
(string()
): The path to the private key to be used when connecting to an instance. Example:"/Users/myuser/.ssh/id_rsa"
-
wo_orch/public_key
(string()
): The path to the public key to be used when connecting to an instance. Example:"/Users/myuser/.ssh/id_rsa.pub"
-
wo_orch/home_dir
(string()
): The path to be contain the deployed nodes on the managed hosts. It is the home directory of the user by default. -
wo_orch/cloud-prefix
(string()
): A prefix to be used when naming instances, SSH keys, etc. in the cloud. For example, if you specify"mycloud-"
, all instances will be named"mycloud-<UUID>"
. -
wo_orch/hook_dirs
([string()]
): Directories that may contain modules (BEAM files) that should be loaded into WombatOAM. These modules can then be called from deployment hooks.
Example:
1 |
|
-
wo_logs/mail_sender
(string()
): The email address used as theFrom
field when emails are sent. Example:"user@mail.com"
-
wo_logs/mail_recipients
([string()]
): A list of email addresses where mails are sent. Example:["person@mail.com", "another.person@mail.com"]
-
wo_logs/mail_severity
(atom()
): A severity value specifying the minimum required severity a notification must have in order for it to be emailed. Example:error
-
wo_logs/gen_smtp_options
: The configuration values for the SMTP client used, gen_smtp.
Example:
1 2 3 4 5 |
|
wo_logs/graylog
: The configuration values for Graylog log management tool, graylog.
Example:
1 2 3 4 5 6 7 8 9 10 |
|
wo_logs/number_of_logs_per_page
: By default, the number of logs that are returned is 20. But this value could be overriden by setting the parameternumber_of_logs_per_page
in the wombat.config file as follows
1 |
|
Though the maximum and minimum number of logs that could be returned is 100 and 20 respectively. So, any value for number_of_logs_per_page
greater than 100 or less than 20, will not take effect.