Moogfarmd Reference

Moogfarmd controls all other services in Moogsoft Enterprise and manages which algorithms and Moolets are running.

Services

We advise that you start Moogfarmd as a service. A service script is provided out of the box for the default Moogfarmd configuration and is located here:

/etc/init.d/moogfarmd

A backup Moogfarmd service script is located at $MOOGSOFT_HOME/etc/service-wrappers/moogfarmd.

If using multiple instances of Moogfarmd on the same host, we advise that you copy and modify the default Moogfarmd service script for each Moogfarmd running on the host.

Run the Moogfarmd Service Daemon

Moogfarmd is a command line executable that can be run as a service daemon.

To execute the daemon and view available arguments run:

moog_farmd --help

By default, you do not need either 'config' or 'instance'. If you run the system without configuring either of these, the moogfarmd instance loads the default configuration file for moogfarmd, and responds to farmd_ctrl with no instance specified. See High Availability Overview for more information on High Availability.

The moog_farmd command line executable accepts the following arguments:

Option

Input

Description

--clear_state

-

Clears any persisted state information associated with Moogfarmd on startup.

--cluster <arg>

String: <cluster name>

Name of the High Availability (HA) cluster. Overwrites the value in the configuration file.

--config <arg>

String: <file path/name>

Name and path of the configuration file specific to the running Moogfarmd instance.

--group <arg>

String: <group name>

Name of the HA group. Overwrites the value in the configuration file.

-h, --help

-

Displays all command line options.

--instance <arg>

String: <instance name>

Enables you to name the Moogfarmd instance. You can refer to this name in the farmd_ctrl utility, which allows you to start, restart and reload the various Moolets.

--logconsole

-

Instructs Moogfarmd to write logs to the console only.

--logfilename <arg>

String: <file path/name>

Name and path of the Moogfarmd log file.

-l, --loglevel <arg>

INFO|WARN|ALL

Specifies the debug level. Defaults to WARN, which is the recommended level in all production implementations.

--mode <arg>

String: active/passive

Starts the process in passive or active mode. The default is active.

--service_instance <arg>

String: <service suffix>

Suffix for the service name.

-v, --version

-

Displays the Moogfarmd version number.

Configuration

You can control Moogfarmd behavior through the following files:

  • system.conf: the general Moogsoft Enterprise system configuration file is located in $MOOGSOFT_HOME/config/system.conf. See System Configuration.

  • moog_farmd.conf: configuration specific to Moogfarmd operation. If you run multiple instances of Moogfarmd, each needs it own configuration file. All instances of Moogfarmd which do not specify a different --config use the default configuration file located in $MOOGSOFT_HOME/config/moog_farmd.conf.

Moogfarmd runs individual isolated applications called Moolets inside the Moogfarmd app container. Moolets are a parallel concept to servlets in a traditional enterprise application container such as Tomcat. Moogfarmd controls the flow of data through the Moolets where the data can come via the Message Bus or from other Moolets.

You can configure the following properties in the Moogfarmd configuration files:

alert_threshold

The minimum number of alerts that must be present in a cluster before it can become a Situation.

Type

Integer

Required

Yes

Default

2

bus_thread_pool_queue_limit

The maximum number of Message Bus messages to store in memory.

Type

Integer

Required

Yes

Default

0 (unlimited)

Note

If you reduce this value, message data may be lost.

db_connections

Specifies the number of database connections for Moogfarmd independently of the number of threads.

Type

Integer

Required

Yes

Default

30

Note

Do not change this setting count unless instructed by Moogsoft Support.

file_only_config

This setting serves two purposes related to the Configuration Migration Utility:

  • Setting the property to true before upgrading prevents the configuration migration utility from running.

  • Setting the property to true after upgrading causes Moogsoft to ignore all database configurations for Cookbook and Tempus clustering algorithms as well as merge groups, and only load their file configurations instead.

Type

Boolean

Required

No

Default

True

ha

The moog_farmd.conf file includes settings you can use to specify the cluster, group, and instance for an HA configuration hierarchy. See High Availability Configuration Hierarchy.

Note

Do not change any other HA settings in this file unless instructed by Moogsoft Support.

maximum_rest_requests

The maximum allowed number of concurrent asynchronous REST tasks. Increasing the value consumes more system resources.

Type

Integer

Required

Yes

Default

200

moobot_optimization

The optimization level to use for Moobots.

Type

Integer

Required

Yes

One of

  • -1: Moobots are interpreted.

  • 0-9: Moobots are precompiled. 0 is minial optimization and 9 is maximum optimization.

See Mozilla optimization documentation for more information.

Default

0

moolet_queue_size_limit

The maximum number of messages from each Moolet to store in memory. You can overwrite this setting in individual Moolet configurations.

Type

Integer

Required

Yes

Default

0 (unlimited)

Note

If you reduce this value, message data may be lost.

retention_period

Length of time in seconds to keep unchanged closed/superseded Situations in memory.

Type

Integer

Required

Yes

Default

86400 (1 day)

sig_resolution

Section of the file containing properties related to Situation resolution.

Type

Object

Required

Yes

Default

N/A

sig_similarity_limit

The percentage of alerts two Situations must share before they are merged.

Type

Number

Required

Yes

Default

0.7 (70%)

threads

Global number of Moobots (threads) per Moolet. Override this setting by using the threads property in individual Moolet configurations.

Type

Integer

Required

Yes

Default

10

Note

Do not change this setting unless instructed by Moogsoft Support.