Next Topic

Previous Topic

Book Contents

Running A Query

bveCLI supports all standard BVE API commands with corresponding parameters, as outlined in the BVE FlexAPI Protocol Reference. A command issued on bveCLI is transparently executed on the remote server and the response from the server is parsed/analyzed. For configuration commands that only return a success/failure response, no output is presented unless the command was not successful. A command that returns configuration/performance data (eg. device.list, location.list) is presented in a readable format.

Sample Session

traverse[192.168.10.21:7661]# device.list "devicename=Cisco*"
.---------------------------------------------------------.
|                    Number of Items: 2                   |
+--------------------------+------------------------------+
| Parameter                | Value                        |
+--------------------------+------------------------------+
|              accountname | Zyrion, Inc.                 |
|      accountserialnumber | 49                           |
|                  address | 192.168.10.250               |
|           agentbatchmode | 1                            |
|           agentcommunity | secret1                      |
|                agentport | 161                          |
|             agentversion | 2                            |
|                clearonok | false                        |
|                  comment | WAN Router/Default Gateway   |
|      configbackupenabled | true                         |
|    configbackupfrequency | 360                          |
|               devicename | Cisco Router                 |
|               devicetype | IP Router                    |
|                  dgename | localhost                    |
| flappreventionwaitcycles | 0                            |
|               isimported | false                        |
|               isreadonly | false                        |
|              issuspended | false                        |
|             locationname | Corporate Office             |
|                    model | 3620                         |
|              parentnames |                              |
|       rediscoveryenabled | false                        |
|             serialnumber | 220070                       |
|            showonsummary | true                         |
|              smartnotify | true                         |
|             tag1 (tag 1) | IT                           |
|             tag2 (tag 2) |                              |
|             tag3 (tag 3) |                              |
|             tag4 (tag 4) |                              |
|             tag5 (tag 5) |                              |
|              v3authproto | 1                            |
|              v3privproto | 1                            |
|                   vendor | Cisco Systems                |
+--------------------------+------------------------------+
|              accountname | Zyrion, Inc.                 |
|      accountserialnumber | 49                           |
|                  address | 192.168.14.1                 |
|                clearonok | false                        |
|                  comment |                              |
|      configbackupenabled | false                        |
|               devicename | Cisco UCS Platform           |
|               devicetype | Other/Generic Device         |
|                  dgename | localhost                    |
| flappreventionwaitcycles | -1                           |
|               isimported | false                        |
|               isreadonly | false                        |
|              issuspended | false                        |
|             locationname | Corporate Office             |
|                    model |                              |
|              parentnames | Primary Distribution Switch  |
|       rediscoveryenabled | false                        |
|             serialnumber | 2400080                      |
|            showonsummary | true                         |
|              smartnotify | true                         |
|             tag1 (tag 1) |                              |
|             tag2 (tag 2) |                              |
|             tag3 (tag 3) |                              |
|             tag4 (tag 4) |                              |
|             tag5 (tag 5) |                              |
|                   vendor |                              |
'--------------------------+------------------------------'

traverse[192.168.10.21:7661]# test.list "devicename=Cisco Router", "testname=Proc*Memory*"
.----------------------------------------------------------.
|                    Number of Items: 1                    |
+--------------------------+-------------------------------+
| Parameter                | Value                         |
+--------------------------+-------------------------------+
|              accountname | Zyrion, Inc.                  |
|               actionname | None                          |
|           agentbatchmode | 1                             |
|           agentcommunity | secret1                       |
|                agentport | 161                           |
|             agentversion | 2                             |
|        criticalthreshold | 95                            |
|               devicename | Cisco Router                  |
| flappreventionwaitcycles | -1                            |
|                 interval | 600                           |
|              issuspended | false                         |
|                 maxvalue | 47536288                      |
|         resultmultiplier | 1.0                           |
|   resultprocessdirective | 1                             |
|             schedulename | Default Schedule              |
|             serialnumber | 250005                        |
|  shadowcriticalthreshold | 95                            |
|   shadowwarningthreshold | 85                            |
|             slathreshold | 76                            |
|                  snmpoid | .1.3.6.1.4.1.9.9.48.1.1.1.5.1 |
|                  subtype | cisco_memfree                 |
|               suppressed | false                         |
|                 testname | Processor Memory Util         |
|                 testtype | snmp                          |
|            thresholdtype | 1                             |
|      timebasedthresholds | false                         |
|                    units | %                             |
|              v3authproto | 1                             |
|              v3privproto | 1                             |
|         warningthreshold | 85                            |
'--------------------------+-------------------------------'

traverse[192.168.10.21:7661]# device.create "devicename=TEST1", "location=Corporate Office", "devicetype=windows"
ERROR: Missing required fields '"address=<value>"', and '"locationName=<value>"'.

traverse[192.168.10.21:7661]# device.create "devicename=TEST1", "address=127.0.0.1", "locationname=Corporate Office", "devicetype=windows"

traverse[192.168.10.21:7661]# device.list "devicename=TEST1"
.---------------------------------------------.
|              Number of Items: 1             |
+--------------------------+------------------+
| Parameter                | Value            |
+--------------------------+------------------+
|              accountname | Zyrion, Inc.     |
|      accountserialnumber | 49               |
|                  address | 127.0.0.1        |
|                clearonok | false            |
[...]
traverse[192.168.10.21:7661]# device.delete "devicename=TEST1"

traverse[192.168.10.21:7661]#