status

Usage

vars [global options] status [options]

Options

Global options are detailed here.

--output=OUTPUT
Output encoding. Available OUTPUT options are plain (default), json, and xml.
-h | --help
Show help message.

Definition

The status command retrieves the status of the Vars daemon. Healthy statuses are STARTING, WARMING, and READY.

Examples

Returning the status of the Vars daemon

After the Vars daemon has been started (by executing vars daemon), you can retrieve the daemon’s status with the following command:

vars status

If you run vars status immediately after launching the daemon, you may see a message like this:

{"component":"vars","log_level":"err","message":"Head http://127.0.0.1:4444: dial tcp 127.0.0.1:4444: getsockopt: connection refused","timestamp":"2017-04-24T18:21:07.677909"}

This means that the daemon is still attempting to connect to port 4444, which is expected behavior. If you wait a little longer and run vars status again, you’ll see one of the following messages:

STARTING
means that the application is initializing, but hasn’t begun to warm the cache.
WARMING
means that the application is initialized and warming has begun, but the cache isn’t fully primed. The vars get, vars put, and vars delete commands are accepted in this state, but vars list and vars listget are not.
READY
means that the application is initialized and the cache is fully primed. You may use any Vars command at this stage.

Returning the Vars daemon status as JSON, XML, or plain text

You can output the Vars daemon status as JSON, XML, or plain text.

To output the status as JSON, use the following command:

vars status --output=json

You’ll see output like this:

{"instance_id":"external-34-36-3b-62-c5-52","status":"READY","key_count":3}

To output the status as XML, use the following command:

vars status --output=xml

You’ll see output like this:

<StatusOutput><instance_id>external-34-36-3b-62-c5-52</instance_id><status>READY</status><key_count>3</key_count></StatusOutput>

Plain text is the default. To output the status as plain text, you can either execute vars status or the following command:

vars status --output=plain

You’ll see output like this:

READY

In the XML and JSON output, you’ll see the following fields:

instance_id
The node ID and queue key
status
The status of the daemon
key_count
The number of keys in Vars’ DynamoDB table