Skip to content

Monitor the Status and Runtime of the Lens

The status indicates the Resource's lifecycle state, such as active, error, or deleted, and helps users quickly assess whether the Resource is available and functioning as expected. In contrast, the runtime reflects the Resource's execution state, such as running, failed, or pending, capturing what is actively happening behind the scenes, typically at the container or pod level. Together, these signals help users to detect configuration issues, operational failures, and disruptions that could impact downstream workflows.

A Lens is a non-runnable Resource in DataOS; however, during the creation of a Lens model, a corresponding Service is automatically generated in the backend with the suffix ‘-api’. This Service handles the Lens’s API interface, and users can view its status and runtime.

Monitor the status of Lens using DataOS CLI

The status of a Lens can be monitored using the DataOS CLI by executing the following command, replacing the placeholder with the workspace in which the user is working. This command will list all the Lenses created by the user.

dataos-ctl get -t lens-w ${{workspace-name}}

Example Usage:

dataos-ctl get -t lens -w public 
INFO[0000] 🔍 get...                                     
INFO[0001] 🔍 get...complete                             

                   NAME                  | VERSION | TYPE | WORKSPACE |   STATUS    | RUNTIME |           OWNER            
-----------------------------------------|---------|------|-----------|-------------|---------|----------------------------
   data-product-insights                 | v1alpha | lens | public    | active      |         | iamgroot                    

In the example above, the STATUS column indicates the current state of the Lens is active in this case, which confirms that the Lens is available and usable.

Monitor the status of Lens on Metis

To monitor the status of Lens on the Metis Catalog UI, follow the steps below:

  1. Open the Metis Catalog.

    Open the Metis Catalog

  2. Search for a Lens by name.

    Search the Lens in Metis

  3. Click on the Lens that needs to be monitored and check the Status, which is represented as State.

    Lens details in Metis

The active state indicates that the Lens is currently accessible and usable by other DataOS Resources. This is the expected state for any active Lens within DataOS.

Monitor the status of a Lens on Operations

To monitor the status of Lens on the Operations app, follow the steps below:

  1. Open the Operations app.

    Open the Operations app

  2. Under the User space → type → Lens search for the Lens.

    Operations > User Space > Lens

    The active status indicates that the Resource is valid and available for use within DataOS. This is the expected state for a healthy and usable Resource.

  3. On clicking the Lens, its builder state can also be monitored.

    Lens details in Operations

    Monitoring the Builder Stage is crucial, especially when status = error. If the builder stage = building, the issue likely occurred after build, possibly runtime or external issues. But if the builder stage = error, then the YAML file itself needs fixing.

Configure alerts for status changes

To automatically track critical state transitions, users can configure a Monitor and Pager to send alerts when the status of a Lens changes to values like error or deleted. This enables teams to respond immediately to resource failures, misconfigurations, or unexpected deletions that may impact dependent components. Click here to view the steps to set up alerts for status changes.