Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Entity commands

add

Use the add command to create a new entity. If the entity already exists, AKIPS will update it.

You cannot change an entity's type once created.

Use the following syntax:

add {type} {parent name}
add {type} {parent name} {child name} = [{index,[description]}]
add {type} {parent name} {child name} {attribute name} [= {value}]

Examples

Add a router with an interface:

add device Router1
add system Router1 sys = 0
add text Router1 sys SNMPv2-MIB.sysName = "Router1.akips.com"
add text Router1 sys SNMPv2-MIB.sysLocation = "Test Rack"
add text Router1 sys SNMPv2-MIB.sysDesc = "Cisco IOS 7200 Version 12.4(9) T RELEASE (fc1)"
add text Router1 sys SNMPv2-MIB.sysContact = "AKIPS developers"
add uptime Router1 sys SNMPv2-MIB.sysUpTime = 1432703430
add text Router1 sys ip4addr = 10.1.8.250
add text Router1 sys ip6addr = fd00:10:1:8::250
add system Router1 ping4 = "4,10.1.8.4"
add rtt Router1 ping4 PING.icmpRtt
add counter Router1 ping4 PING.icmpDup
add counter Router1 ping4 PING.icmpLost
add enum Router1 ping4 PING.icmpState = 2,up
add system Router1 ping6 = "6,fd00:10:1:8::250"
add rtt Router1 ping6 PING.icmpRtt
add counter Router1 ping6 PING.icmpDup
add counter Router1 ping6 PING.icmpLost
add enum Router1 ping6 PING.icmpState
add interface Router1 Fa0/0 = "1,Link to remote site"
add integer Router1 Fa0/0 IF-MIB.ifSpeed = 1000000000
add text Router1 Fa0/0 IF-MIB.ifAlias = "Link to remote site"
add counter Router1 Fa0/0 IF-MIB.ifHCInOctets = 1
add counter Router1 Fa0/0 IF-MIB.ifHCOutOctets = 1
add enum Router1 Fa0/0 IF-MIB.ifAdminStatus = 1,up
add enum Router1 Fa0/0 IF-MIB.ifOperStatus = 1,up
add counter Router1 Fa0/0 IF-MIB.ifHCInBroadcastPkts = 1
add counter Router1 Fa0/0 IF-MIB.ifHCOutBroadcast Pkts = 1
add counter Router1 Fa0/0 IF-MIB.ifHCInMulticastPkts = 1
add counter Router1 Fa0/0 IF-MIB.ifHCOutMulticast Pkts = 1

Add some custom entries for asset information:

add child Router1 asset
add text Router1 asset serial_number = "123456789"
add text Router1 asset purchase_date = "2017/05/02"
add integer Router1 asset purchase_cost = 12013

get

Use the get command to return the value assigned to a child or attribute.

Use the following syntax:

get {parent name} {child name} [{attribute name}]

Examples

Get the value for an interface:

get swt250 Fa0/1

10001,Link to swt2512

Get the value for an attribute:

get swt250 sys SNMPv2-MIB.sysLocation

Test room

The get command for an attribute with a type of uptime returns two values separated by a comma:

  1. when the value was reset to zero (epoch timestamp)
  2. when the attribute value was last updated (epoch timestamp).

Example

get swt250 sys SNMPv2-MIB.sysUpTime

1427283250,1433815768

The get command for an attribute with a type of enum returns five values separated by commas:

  1. list number (from MIB)
  2. text value (from MIB)
  3. time created (epoch timestamp)
  4. time modified (epoch timestamp)
  5. child description.

Example

get swt250 Fa0/1 IF-MIB.ifOperStatus

1,up,1431579447,1431579447,link to swt251

delete

Use the delete command to remove a single entity, including all of its childs and attributes.

Use the following syntax:

delete {type} {parent name} [[{child name}] {attribute name}]

Examples

Delete a device:

delete device CoreRouter12

Delete a child:

delete interface CoreRouter1 Fa0/03

Delete an attribute:

delete integer CoreRouter1 Fa0/0 IF-MIB.ifSpeed


mget

Use the mget command to retrieve large amounts of configuration information.

Use the following syntax:

mget {type}

Examples

mget device
mget interface

You can also add regex.

Use the following syntax:

mget {type} [{parent regex} [{child regex} [{attribute regex}]]]
  [value {text|/regex/|integer|ipaddr}]
  [profile {profile name}] [any|all|not group {group name} ...

The format of the return values depends on which entity (parent, child or attribute) you request.

If you request a parent then the type must be a parent or a wildcard, e.g.

mget * /^nyc-.*-rtr/ 
mget device *
mget user *

If you request a child then the type must be a child or a wildcard, e.g.

mget * swt250 /^Fa/
mget system swt250 *
mget interface * *
mget interface * /^Fa0/1/

If you request an attribute then the type must be an attribute or a wildcard, e.g.

mget * swt250 * *
mget counter swt250 Fa0/1 /IF-MIB/

Examples

Retrieve the entire configuration for a single device:

mget * swt250 * *

Retrieve the sysName for each device:

mget text * * SNMPv2-MIB.sysName

Atlanta-ro sys SNMPv2-MIB.sysName = Atlanta-ro.akips.com
Baltimore-ro sys SNMPv2-MIB.sysName = Baltimore-ro.akips.com
Boston-ro sys SNMPv2-MIB.sysName = Boston-ro.akips.com
Charlotte-ro sys SNMPv2-MIB.sysName = Charlotte-ro.akips.com
cisco-74-1-1 sys SNMPv2-MIB.sysName = cisco-74-1-1

Retrieve all IF-MIB objects for a single interface:

mget * swt250 Fa0/1 /^IF-MIB.*/

swt250 Fa0/1 IF-MIB.ifAdminStatus = 1,up,1434416774,1434416774
swt250 Fa0/1 IF-MIB.ifAlias = Link to swt251
swt250 Fa0/1 IF-MIB.ifDescr = FastEthernet0/1
swt250 Fa0/1 IF-MIB.ifDuplex = 3,fullDuplex,1434416774,1434416774
swt250 Fa0/1 IF-MIB.ifHCInBroadcastPkts = 1

Retrieve the IPv4/6 addresses for each device:

mget text * sys /ip.addr/

Atlanta-ro sys ip4addr = 10.4.26.1
Atlanta-ro sys ip6addr = fd00:10:4:26::1
Baltimore-ro sys ip4addr = 10.4.22.1
Baltimore-ro sys ip6addr = fd00:10:4:22::1
Boston-ro sys ip4addr = 10.4.23.1
Boston-ro sys ip6addr = fd00:10:4:23::1
...

Case study

A customer used the mget command to obtain the serial numbers of all devices on his network, including their access points:

mget * * * /serial/


mlist

Use the mlist command to retrieve a list of matching entities.

Unlike the mget command, the output does not contain any entity values.

Use the following syntax:

mlist {type} [{parent regex} [{child regex} [{attribute regex}]]]
  [value {text|/regex/|integer|ipaddr}]
  [profile {profile name}] [any|all|not group {group name} ...

Examples

Retrieve a list of all interfaces on a device:

mlist interface swt250 *

swt250 Fa0/1
swt250 Fa0/10
swt250 Fa0/11
swt250 Fa0/12
swt250 Fa0/16
...

Retrieve a list of interface attributes on a device with the type counter:

mlist counter swt250 * /^IF-MIB./

swt250 Fa0/1 IF-MIB.ifHCInBroadcastPkts
swt250 Fa0/1 IF-MIB.ifHCInMulticastPkts 
swt250 Fa0/1 IF-MIB.ifHCInOctets 
swt250 Fa0/1 IF-MIB.ifHCInUcastPkts
swt250 Fa0/1 IF-MIB.ifHCOutBroadcastPkts
swt250 Fa0/1 IF-MIB.ifHCOutMulticastPkts
swt250 Fa0/1 IF-MIB.ifHCOutOctets
swt250 Fa0/1 IF-MIB.ifHCOutUcastPkts
swt250 Fa0/1 IF-MIB.ifInDiscards
swt250 Fa0/1 IF-MIB.ifInErrors
...

Retrieve a list of enumerated attribute types configured for a device:

mlist enum swt250 * *

swt250 cstack.1 CISCO-STACK-MIB.moduleStandbyStatus
swt250 cstack.1 CISCO-STACK-MIB.moduleStatus
swt250 Fa0/1 IF-MIB.ifAdminStatus
swt250 Fa0/1 IF-MIB.ifDuplex
swt250 Fa0/1 IF-MIB.ifOperStatus
swt250 Fa0/1 IF-MIB.ifType
swt250 Fa0/10 IF-MIB.ifAdminStatus
...

mtype

Use the mtype command to retrieve a list of matching entities.

Unlike the mget command, the output contains entity types, not values. Use the following syntax:

mtype {type} [{parent regex} [{child regex} [{attribute regex}]]]
  [value {text|/regex/|integer|ipaddr}]
  [profile {profile name}] [any|all|not group {group name} ...]

Examples

Retrieve a list of childs for a device:

mtype * swt250 *

swt250 cpu.1 processor
swt250 cstack.1 child
swt250 Fa0/1 interface
...
swt250 Gi0/1 interface
swt250 Gi0/2 interface
swt250 ipsla.1 ipsla
swt250 ipsla.2 ipsla
swt250 ping6 system
swt250 psu.1003 system
swt250 ram.1 memory
swt250 ram.2 memory
swt250 sys system

Retrieve a list of attributes for a device:

mtype * swt250 * *

swt250 cpu.1 CISCO-PROCESS-MIB.cpmCPUTotal1minRev gauge
swt250 cstack.1 CISCO-STACK-MIB.moduleModel text
swt250 cstack.1 CISCO-STACK-MIB.moduleStandbyStatus enum
swt250 cstack.1 CISCO-STACK-MIB.moduleStatus enum
swt250 Fa0/1 IF-MIB.ifAdminStatus enum
swt250 Fa0/1 IF-MIB.ifAlias text
swt250 Fa0/1 IF-MIB.ifDescr text
swt250 Fa0/1 IF-MIB.ifDuplex enum
swt250 Fa0/1 IF-MIB.ifHCInBroadcastPkts counter
swt250 Fa0/1 IF-MIB.ifHCInMulticastPkts counter
...

rename

Use the rename command to rename a parent or child.

Use the following syntax:

rename {type} {existing parent name} {new parent name}

rename {type} {existing parent name} {existing child name} {new parent name} {new child name}

Examples

Rename a device:

rename device nyc-rtr usa-nyc-rtr12

Move an interface from one device to another:

rename interface nyc-rtr1 Se0/1 nyc-rtr2 Se0/1


set

Use the set command to update an entity's value.

Use the following syntax:

set {parent name} {child name} [{attribute name}] = {value}

Examples

set swt250 sys SNMPv2-MIB.sysLocation = "Test Lab"
set swt250 sys SNMPv2-MIB.sysContact = "[email protected]"
set swt250 sys ip4addr = 10.1.8.250

mdelete

Use the mdelete command to remove several entities at once. You can test your selection first with mget.

You can use regex to precisely target the entities.

Use the following syntax:

mdelete {type} {parent regex} [{child regex} [{attribute regex}]]

Examples

Delete all devices (We do not recommend this!):

mdelete device *

Delete all devices in a group:

mdelete device * any group testlab

Delete all IF-MIB attributes:

mdelete * CoreRouter1 Fa0/0 /IF-MIB/

Delete all ipsla entities for a device:

mdelete * Corerouter1 /ipsla/