CLI reference
From Sanet
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
- ID: an internal numeric ID used by the system
- NAME: the container's name
- PARENT: The parent container in the tree. Each tree should have one, and only one, container with empty parent.
- X, Y: position of the container when drawn in its parent
- ZINDEX: stack position of the container when drawn in its parent
- SZ: relative size of the container when drawn in its parent
- DESCRIPTION: A human-readable description
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
- ID: an internal numeric ID used by the system
- NAME: the icon's name. Reserved icons have names: node, container, site, iface
- FNAME: base name of the file used when rendering this icon
- SUBST: thr RGB color to substitute with a color expressing the status (red, green, etc.)
- DESCRIPTION: A human-readable description
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:
- ID: an internal numeric ID used by the system
- NAME: the interface's name
- INSTANCE: instance string which, together with xform, identifies this interface
- XFORM: a string representing the algorithm used to find out the ifIndex, given the instance string
- T: number of targets associated with this interface
- M: number of measures associated with this interface
- CONNECTS: the interface connected to this one (node and interface name)
- DESCRIPTION: A human-readable description for this interface
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:
- ok: Check successful
- dependson: Depends on a target which is not OK
- strange: Yelding a strange value, e.g. zero
- uncheckable: Cannot evaluate the expression
- error: Cannot store the result
- problematic: error or uncheckable
- suspect: error or uncheckable or strange or dependson
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:
- ID: an internal numeric ID used by the system
- NAME: the node's name, used to lookup its IPv4 address
- IPV6: the name used to lookup the IPv6 address (AAAA record)
- ICON: name of the icon used to draw the node in the web interface
- T: number of targets associated with this node
- M: number of measures associated with this node
- I: number of interfaces
- DESCRIPTION: A human-readable description for this node
show site
show site
Display information about the site.
- NAME: The name of the site
- DESCR: a human-readable description
- INIL TIME: the last time an icon, node, interface or link was modified
- FOREST TIME: the last time a tree or container was modified
- HTML DETAILS: Details shown in the site details pane of the web interface
- CLI BANNER: CLI login message
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:
- arp-table: ARP table
- bridge-ports-table: Bridge ports instance numbers and corresponding ifIndex, from BRIDGE-MIB
- cdp-table: CDP neighbors table from CISCO-CDP-MIB
- cisco-switchports: Cisco switchports: access, trunk, VLANs from the Cisco MIBs
- cisco-vlan-ifindex: VLAN IDs and corresponding SVI ifindex, from the Cisco MIB
- cisco-vlan-names: VLAN IDs and corresponding names, from the Cisco MIB
- hrfs-table: Host Resources MIB filesystems in storage table
- hrstorage-table: Host Resources MIB storage table
- ip-addresses: IP addresses assigned to interfaces
- lldp-table: LLDP neighbors table
- mpls-vrf-interfaces host [vrf name]: MPLS vpn/vrf interface table
- mpls-vrf-routes host [vrf name]: MPLS vpn/vrf routing table
- mpls-vrf-table: MPLS vpn/vrf table
- multiaf-addresses: Multi address family (IPv4 and IPv6) address table
- multiaf-routes: Multi address family (IPv4 and IPv6) routing table
- routing-table: IPv4 routing table via classic RFC1213
- stp-table: Spanning Tree ports table
- system: MIB2 system group
- walk OID: SNMP table walk of a node, specify an OID in numeric format
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.
- ID: an internal numeric ID used by the system
- NAME: the tree's name. geo is a reserved name.
- SORT: An integer number used to sort the tree among the others, in the web interface
- ALLNODES?: if 1, all nodes will be shown in this tree, the root will contain nodes not otherwise associated
- DESCRIPTION: A human-readable description
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.
- relative-x: horizontal position of centre, fractional, 0 is left and 1 is right
- relative-y: vertical position of centre, fractional, 0 is down and 1 is up
- z-index: stacking order, non-negative integer, 0 is default, greater covers smaller
- relative-size: size, fractional, 0 - 1
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.