Command 'juju status'

See also: How to manage models, How to manage machines, How to manage applications, How to manage units

Summary

Report the status of the model, its machines, applications and units.

Usage

juju status [options] [<selector> [...]]

Options

Flag Default Usage
--B, --no-browser-login false Do not use web browser for authentication
--color false Use ANSI color codes in tabular output
--format tabular Specify output format (json
--m, --model Model to operate in. Accepts [:]
--no-color false Disable ANSI color codes in tabular output
--o, --output Specify an output file
--relations false Show ‘relations’ section in tabular output
--retry-count 3 Number of times to retry API failures
--retry-delay 100ms Time to wait between retry attempts
--storage false Show ‘storage’ section in tabular output
--utc false Display timestamps in the UTC timezone
--watch 0s Watch the status every period of time

Description

Report the model’s status, optionally filtered by names of applications or units. When selectors are present, filter the report to exclude entities that do not match.

juju status [<selector> [...]]

selects machines, units or applications from the model to display. Wildcard characters (*) enable multiple entities to be matched at the same time.

(<machine>|<unit>|<application>)[*]

When an entity that matches is related to other applications, the status of those applications will also be presented. By default (without a ) the status of all applications and their units will be displayed.

Altering the output format

The ‘–format’ option allows you to specify how the status report is formatted.

–format=tabular (default) Display information about all aspects of the model in a human-centric manner. Omits some information by default. Use the ‘–relations’ and ‘–storage’ options to include all available information.

–format=line –format=short –format=oneline Reports information from units. Includes their IP address, open ports and the status of the workload and agent.

–format=summary Reports aggregated information about the model. Includes a description of subnets and ports that are in use, the counts of applications, units, and machines by status code.

–format=json –format=yaml Provide information in a JSON or YAML formats for programmatic use.

Examples:

# Report the status of units hosted on machine 0
juju status 0

# Report the status of the the mysql application
juju status mysql

# Report the status for applications that start with nova-
juju status nova-*

# Include information about storage and relations in output
juju status --storage --relations

# Provide output as valid JSON
juju status --format=json

# Watch the status every five seconds
juju status --watch 5s

# Show only applications/units in active status
juju status active

# Show only applications/units in error status
juju status error

See also:

machines
show-model
show-debug-log
show-status-log
storage

Interpreting the output:

The juju status command shows the current status of a deployment of any given model.

Deploying this example workload to a new model (replicate by executing the commands shown) results in the following output from juju status:

# Deploy example workload
juju deploy hello-juju
juju deploy ntp
juju relate hello-juju ntp
$ juju status
Model    Controller  Cloud/Region         Version  SLA          Timestamp
default  test        localhost/localhost  2.9.27   unsupported  10:03:25+13:00

App         Version  Status  Scale  Charm       Channel  Rev  Exposed  Message
hello-juju           active      1  hello-juju  stable     8  no       
ntp         3.5      active      1  ntp         stable    47  no       chrony: Ready, time sync disabled in container

Unit           Workload  Agent  Machine  Public address  Ports    Message
hello-juju/0*  active    idle   0        10.133.79.245   80/tcp   
  ntp/0*       active    idle            10.133.79.245   123/udp  chrony: Ready, time sync disabled in container

Machine  State    DNS            Inst id        Series  AZ  Message
0        started  10.133.79.245  juju-c4ebcb-0  focal       Running

Models

The first section reported relates to the overall model.

Model    Controller  Cloud/Region         Version  SLA          Timestamp
default  test        localhost/localhost  2.9.27   unsupported  10:03:25+13:00

Model

The model’s name, as defined when performing juju bootstrap or the add-model command.

Controller

The controller’s name, as defined by the juju bootstrap command.

Cloud/Region

The cloud and region selected during juju bootstrap. Valid clouds are listed by the juju clouds command. Each cloud’s regions are listed by the juju regions command.

In this instance localhost refers to LXD.

Version

The version of Juju that is being run by the Juju agents within the model. Newer versions of the Juju client will always inter-operable with older versions of Juju.

Info:

The Version relates to the deployed version of Juju on the controller and not the local version of Juju CLI. To obtain the local version of Juju, using juju version should suffice.

SLA

The “Support Level Agreement” for this model.

Timestamp

The time when the controller gathered the information for the report.

Info:

The Timestamp is of the Model time, not the local time.

Remote Applications (optional)

The remote applications section is not shown by default. Only when a remote-application (SAAS) is consumed, will it appear in the juju status output.

SAAS   Status  Store    URL
mysql  active  unknown  admin/cmr-model.mysql

Deploying a remote application will include the additional information.

SAAS / Remote Application

The name of the remote application.

Status

Indicates the status of the remote application from the perspective of the consumer side.

Store

Describes the source of the application. Will report “unknown” when Juju is unable to determine its source.

URL

The “offer URL” that describes how the Juju controller can connect with remote applications.

Applications

The application section aggregates information that applicable to all units of each application. This include the details about the charm(s) that are deployed and an overall status code.

App         Version  Status  Scale  Charm       Channel  Rev  Exposed  Message
hello-juju           active      1  hello-juju  stable     8  no       
ntp         3.5      active      1  ntp         stable    47  no       chrony: Ready, time sync disabled in container

App

The application name, as provided during juju deploy. The application name can differ from the charm’s default name to enable multiple logical services running the same underlying application.

Version

The version number of the application itself, not the charm.

Status

May be “active”, “blocked”, “error”, “maintenance”, “waiting”. The “blocked” state implies that manual intervention is required. Normally, “blocked” can resolved be adding a relation or setting configuration values. “error” indicates that the charm’s code itself has encountered an error. To resolve this, contact the charm’s author.

Scale

Number of units of this application. Indicates a difference between the desired units and the actual count with a fraction.

Charm

The original charm’s name, which can differ from the App name.

Channel

The channel this application was deployed from.

Rev

The charm’s revision number.

Exposed

Whether this application has been exposed with juju expose or not (“yes” or “no”).

Message

Any messages that are applicable to all units within the application that provide key stages or snapshots of a charm from the author of the charm to the operator.

Units

The units section provides individual information about every unit for a given model. A unit comprises of a singular application unit and can be identified with the application name, followed by the unit number.

Subordinate application units are list underneath the principal units in hierarchical form, once the applications have been related.

Unit           Workload  Agent  Machine  Public address  Ports    Message
hello-juju/0*  active    idle   0        10.133.79.245   80/tcp   
  ntp/0*       active    idle            10.133.79.245   123/udp  chrony: Ready, time sync disabled in container

Unit

The unit name defined from the application name and a unit number for a given application. Each unit number is uniquely incremented to that application, for example hello-juju/0, hello-juju/1 and ntp/0, ntp/1.

Workload

The workload status of a given unit.

Agent

The Juju agent status of a given unit.

Machine

The corresponding machine ID of a unit.

Info:

Subordinates have no corresponding machine ID, instead they run on the same machine as their principal unit.

Public address

The public address of a given unit.

Ports

A list of ports and associated protocols that are available for the unit.

Message

Any messages that are applicable to the unit that provide key stages or snapshots of a charm from the author of the charm to the operator.

Machine

Machine represents the physical/virtual infrastructure for running the units and therefore applications upon.

Machine  State    DNS            Inst id        Series  AZ  Message
0        started  10.133.79.245  juju-c4ebcb-0  focal       Running

Machine

The machine unique identifier.

State

The state of the machine.

DNS

The DNS of the application.

Inst id

The instance identifier that can be used to locate the machine within the physical/virtual infrastructure.

In the example the instance id refers to LXD and can be located using lxc list:

+---------------+---------+----------------------+------+-----------+-----------+
|     NAME      |  STATE  |         IPV4         | IPV6 |   TYPE    | SNAPSHOTS |
+---------------+---------+----------------------+------+-----------+-----------+
| juju-c4ebcb-0 | RUNNING | 10.133.79.245 (eth0) |      | CONTAINER | 0         |
+---------------+---------+----------------------+------+-----------+-----------+
| juju-d8dbef-0 | RUNNING | 10.133.79.210 (eth0) |      | CONTAINER | 0         |
+---------------+---------+----------------------+------+-----------+-----------+

Series

The underlying base of the machine. focal refers to the Ubuntu 20.04 release.

AZ

The availability zone the machine is currently occupying. This is not present on some clouds (for example, LXD).

Message

Any notes, messages or actions to be highlights about a given machine.


Last updated 4 months ago.