CLI reference

From Sanet

Jump to: navigation, search

Contents

SANET CLI Reference

Commands available at all levels

show configuration

show configuration

Display the active configuration text file.

show containers

show containers [tree tree-name [container container-name [details]]]

Display information about all the containers, the containers of a tree, or a particular container

When displaying a single container the keyword details will display fields on multiple lines, without any truncation, and will display contained nodes.

show icons

show icons [icon-name]

Display information about all icons, or a particular icon

show interfaces

show interfaces [node node-name [interface-name [details]]]

Display information about all the interfaces, the interfaces of a node, or a particular interface.

The meaning of the information fields displayed is as follows:

When displaying a single interface the keyword details will display fields on multiple lines, without any truncation.

show measures

show measures [id id | path path | category category | node node [interface iface]| deleted | suspended | outcome ok|dependson|strange|uncheckable|error|problematic|suspect ] [details]


Display summary or detail information about measures.

Measuress can be filtered by category, node and interface, or retrieved by id or path.

Measures can be filtered by their outcome:

show nodes

show nodes [node-name]

Show information about all nodes or, if a node name is given, about a particular node.

The meaning of the information fields displayed is as follows:

show site

show site

Display information about the site.

show snmp

show snmp type host [args...]

Display low-level information queried via snmp from a node or a generic name/ip address. type can be:

Queries will use the configured community and version for a node, and will use public and version 1 for a generic host or ip address.

show targets

show targets [id id | path path | category category | node node [interface iface]| late | deleted | down | uncheckable | suspended | out-of-time | ] [log last n|seconds n] [details]


Display summary or detail information about targets. With the log keyword, display their state transitions, last n or transitions occurred later than n seconds ago.

Targets can be filtered by category, node and interface, or retrieved by id or path.

Targets can be filtered by state: down', uncheckable, suspended, deleted, out-of-time.

The keyworkd late selects targets which are not uncheckable, and were not checked in the last 3 * minperiod, or 3 * min-cycle-time (whichever larger).

show timespec

show timespec timespec year month dayofmonth hours minutes dayofweek

Check if a timespec, when used as the value of the timespec parameter, matches a given moment in time. Displays True or False.

show trees

show trees [tree-name] [orphaned-nodes]

Display information about the trees or a particular tree.

With the orphaned-nodes keyword, display the list of nodes which are not within a container in this tree.

exec

exec [target|measure] [id id|path path] [and-save]

Execute a target or a measure, given by its id or its path, with full debug output. If and-save is specified, results will be saved as if it was executed by the poller process, and mail will be sent for target state changes if applicable. If and-save is not specified, the result will be displayed but will not be saved, and no email will be sent.

exit

exit

Exit from this level, or exit from the CLI if given at top level. This is the same as terminating the input stream, e.g. with ctrl-D.

Main prompt commands

configure

configure [terminal | network]

configure terminal enters configuration mode prompt. configure network is currently unimplemented.

Configuration commands

icon

icon name

Enters icon configuration mode

no icon name name-confirmation

Deletes an icon and all associated configuration. Nodes and containers using this icon will be set to use the default icon. The same will happen if the icon is used to represent the site.

link

link *node-name* *interface-name* *node-name* *interface-name*

Link two interfaces

no link *node-name* *interface-name* *node-name* *interface-name*

Delete previously created link

node

node node-name

Enters node configuration mode, creating the node if it does not exists.

no node node-name node-name-confirmation

Deletes a node and all its interfaces.

rename

rename container tree-name old-name new-name

rename icon old-name new-name

rename interface node-name old-name new-name

rename node old-name new-name

rename tree old-name new-name

Rename an object, keeping all other information and subobjects intact.

You cannot rename a reserved tree or a reserved icon. You cannot move a container to another tree, nor move an interface to another node.

site

site description description line

An human-readable description for the site. The description can be multiple words, on the same line of the command.

site banner multiline banner text multiline banner text .

The CLI banner for the site (max 255 chars). Enter a dot on a line by itself to terminate input. If the line you want to input begins with a dot, double the initial dot.

site details multiline HTML details multiline HTML details .

The HTML details shown in the site details pane of the web interface (max 255 chars). Enter a dot on a line by itself to terminate input. If the line you want to input begins with a dot, double the initial dot.

site name name

The site name.

site icon icon-name

The name of the icon used to represent the site in the web interface.

tree

tree geo**|*tree-name* [**delete**|**rename new-tree-name]

Enter tree configuration mode, creating the tree if it doesn't exist.

no tree tree-name

Delete a previously created tree and all the containers within. Tree geo cannot be deleted.

Container configuration commands

adopt-orhpaned-nodes

adopt-orhpaned-nodes

Adopt, i.e. associate to this container, all the nodes that are not associated with a container for this tree.

description

description text ...

Sets the description for this container.

icon

icon icon-name

Sets the icon used to draw the container in the web interface.

parent

parent container-name

Sets the parent for the container. Each tree must have on, and only one, container without parent.

rectangle

rectangle relative-x relative-y z-index relative-size

Sets drawing information for the rectangle used to represent this container in its parent. If missing, a drawing algorithm is used.

Icon configuration commands

filename

description

subst-color

Interface configuration commands

description

instance

xform

Node configuration commands

description

description text ... Sets the description for this node. In the web interface, the description retrieved via SNMP will be appended to this.

icon

icon icon-name Sets the icon used to draw the node in the web interface.

interface

interface interface-name instance instance xform expression

Creates an interface in the node, with the specified name, instance and xform. In the same node, each interface must have an unique name and an unique (instance, xform) pair. See the Configuration guide for the meaning of the instance and xform arguments.

Deprecated forms of this command, missing the xform and instance arguments are still accepted, but will be removed (xform and instance must be present, so should be specified at creation).

ipv6name

category

category-measure

category-target

community

clusterxform

clusterdistinguisher

measure

note

snmpversion

target

Tree configuration commands

container

container container-name

Enters container configration mode, creating the container if it does not exists.

no container container-name container-name-confirmation [recursive]

Delete a container. With recursive, delete also containers for which this is the parent, grand-parent, etc, recursively. Without recursive, a container with containers in it will not be deleted. Nodes in the deleted container will be disassociated.

description

display-all-nodes

display-order

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox