list

List core Shoreline objects.

The list command returns all instances of the object type specified - Actions, Alarms, Bots, Metrics, Resources, or all objects. The object can be further qualified by piping (adding) an attribute name.

Syntax: list <object_name> | <filter>

List Functions

Below are the list functions that Op supports.

action

list actions lists all Actions.

op>
list actions
NAME                  | RESOURCE_QUERY                               | COMMAND          | TIMEOUT
generic_action_cpu    | host | .pod | .container | app = "shoreline" | `bash killbg.sh` | 60
generic_action_bs_cpu | host | .pod | .container | app = "shoreline" | `bash bsdist.sh` | 60
generic_action_ss_mem | host | .pod | .container | app = "shoreline" | `echo Hello`     | 60

alarm

list alarms lists all Alarms.

op>
list alarms
NAME                  | RESOURCE_QUERY                  | FIRE_QUERY
generic_alarm_cpu     | host                            | ( cpu_usage > 30 | sum ( 30 ) ) >= 18 . 0
generic_bs_alarm_cpu  | host | .pod | app = "bookstore" | ( pod_cpu_usage > 5 | sum ( 30 ) ) >= 18 . 0
generic_ss_alarm_mem  | host | .pod | app = "shoreline" | ( pod_memory_usage > 60 | sum ( 30 ) ) >= 18 . 0

all

list all lists all objects.

op>
list all
TYPE       | NAME            | ENABLED | FIRE_QUERY                                | DESCRIPTION
RESOURCE   | app_containers  | ---     | ---                                       |
ALARM      | high_cpu_alarm  | 0       | ( cpu_usage > 65 | sum ( 30 ) ) >= 15 . 0 |
RESOURCE   | host            | ---     | ---                                       |
METRIC     | cpu_usage       | ---     | ---                                       |
METRIC     | cpu_usage_pre   | ---     | ---                                       | test

bot

list bots lists all Bots.

op>
list bots
TYPE | NAME               | ENABLED | ACTION_STATEMENT      | ALARM_STATEMENT
BOT  | generic_bot_cpu    | 1       | generic_action_cpu    | generic_alarm_cpu
BOT  | generic_bot_bs_cpu | 1       | generic_action_bs_cpu | generic_bs_alarm_cpu
BOT  | generic_bot_ss_mem | 1       | generic_action_ss_mem | generic_ss_alarm_mem

file

list files lists all files transmitted via the cp command.

op>
list files
NAME                                  | DESTINATION_PATH          | RESOURCE_QUERY
file_9fdec4c53a113436383ed5f3dc713481 | /tmp/scripts/my-script.sh | apps_shoreline

metric

list metrics lists all Metrics.

op>
list metrics
TYPE   | NAME           | FORMULA
METRIC | cpu_usage      | (100 - 100 * (metric_query(metric_names="node_cpu_seconds_total", tags={"mode":"
       |                | idle"}) | irate(2) | group() | mean)) | lower_bound(0) | upper_bound(100)
METRIC | cpu_usage_pre  | metric_query(metric_names="cpu_usage_pre")
METRIC | mem_usage      | metric_query(metric_names="node_memory_MemTotal_bytes") - metric_query(metric_na
       |                | mes="node_memory_MemFree_bytes") - metric_query(metric_names="node_memory_Cached
       |                | _bytes") - metric_query(metric_names="node_memory_Buffers_bytes")

resource

list resources lists all Resources.

op>
list resources
TYPE     | NAME      | DESCRIPTION    | FORMULA
RESOURCE | host      | All hosts      | resources(type="HOST")
RESOURCE | pod       | All pods       | resources(type="POD")
RESOURCE | container | All containers | resources(type="CONTAINER")