ServiceDefinition object

The information that Control Center needs to start and manage a service, in JavaScript Object Notation (JSON) format.

Note: Most values may contain Go templates, with Control Center functions. For more information, see Go templates in JSON values.
Atttribute Value Description
Name String The service name.
Command String The command that starts and runs the service.
Description String The service description.
Tags Array of strings Searchable words or phrases for the service.
ImageID String The Docker image ID for the service.
Instances Object The number of instances of the service to run at the same time, in different containers. This object has two members.
Min
The minimum number of instances to run. If the value is zero, no instances are started. If non-zero, the value must be greater than or equal to zero.
Max
The maximum number of instances to run. If the value is zero, only Min is used. If non-zero, the value must be greater than or equal to Min.
ChangeOptions Array of strings Control options for what happens when a running instance of the service is changed.
Launch String Determines whether the service starts when its parent service starts.
AUTO
(Default) Start the service when the parent service starts.
MANUAL
Do not start the service when the parent service starts.
HostPolicy String Determines how to schedule instances of the service on hosts in a resource pool.
LEAST_COMMITTED
(Default) Select the host with the smallest amount of memory committed to other services.
PREFER_SEPARATE
Attempt to schedule instances of the service on separate hosts.
REQUIRE_SEPARATE
Schedule instances of the service on separate hosts only.
Hostname String The virtual host name to use when an instance of the service is run.
Privileged true or false Determines whether containers (in which instances of the service run) have extended privileges.
ConfigFiles Objects The configuration file templates to install in containers (in which instances of the service run).

Each member of this object is a string containing the absolute path of a configuration file template and a ConfigFile object.

Context Object
Endpoints Array of objects The network endpoints that the service uses, as Endpoint objects.
Services Array of objects The subservices that are part of the service, as ServiceDefinition objects.
Tasks Array of objects
LogFilters Object Pairs of strings and values mapping log filter names to log filter definitions.
Volumes Array of objects The list of file system directories to bind mount in containers (in which instances of the service run). Each item is a Volume object.
LogConfigs Array of objects A list of logstash configurations for the log files of the service, as LogConfig objects.
Snapshot Object The bash commands to pause and resume the service. Between commands, Control Center copies the file system of the service's container.

This object has two members:

Pause
The bash command to stop file system writes, or stop the service.
Resume
The bash command to return the service to normal processing.
RAMCommitment Integer The amount of main memory the service requires, in bytes. This value is used to help schedule the service into the best available resource pool.
CPUCommitment Integer The number of CPU cores the service requires. This value is used to help schedule the service into the best available resource pool.
Runs Object The commands the service executes inside its container when invoked with serviced run Command. This object contains one or more command names, each paired with the bash command to run inside the containers.
Actions Object The commands the service executes inside its container when invoked with serviced action Command. This object contains one or more command names, each paired with the bash command to run inside the containers.
HealthChecks Object The commands to invoke (at regular intervals) to gather data about health of the service. Each member of this object is a health check name paired with a HealthCheck object.
Prereqs Array of objects The scripts to run successfully inside a container before starting the service in the container. Each item is an object with two members:
Name
The name of the prerequisite.
Script
The bash command to invoke inside the container.
MonitoringProfile Object Metadata descriptions of the metrics, graphs, and thresholds the service makes available to external monitoring services. The members of this object are the following pairs, in order:
MetricConfigs
An array of MetricConfig objects.
GraphConfigs
An array of GraphConfig objects.
ThresholdConfigs
An array of ThresholdConfig objects.
MemoryLimit float64
CPUShares int64
PIDFile String The path, or the command to generate the path, for the PID file to which signals are copied.

The Control Center project is provided under the Apache 2.0 license. © 2015 Zenoss Control Center ·2015-05-22 14:29:19 +0000