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

Time series commands

calc

Use the calc command to calculate a total, average or median value.

Use the following syntax:

calc total|avg|{median NN} time {time filter}
  {type} {parent name} {child name} {attribute regex} 
  [profile {profile name}] [any|all|not group {group name} ...]

Examples

Calculate the total InOctets for a switch interface for yesterday:

calc total time yesterday counter swt250 Fa0/1 /InOctets/

Calculate the average InOctets for a switch interface for yesterday:

calc avg time yesterday counter swt250 Fa0/1 /InOctets/


mcalc

Use the mcalc command to calculate multiple total, average or median values.

Use the following syntax:

mcalc total|avg|{median NN} time {time filter}
  {type} {parent regex} {child regex} {attribute regex}
  [profile {profile name}] [any|all|not group {group name} ...]

Example

Calculate the In/OutOctets for all interfaces in a group:

mcalc total time yesterday counter * * /^IF-MIB.*InOctets|^IF-MIB.*OutOctets/ any group wan-links
Chicago-ro Se1/0 IF-MIB.ifInOctets = 90922240
Chicago-ro Se1/0 IF-MIB.ifOutOctets = 112385280
Chicago-ro Se1/1 IF-MIB.ifInOctets = 0
Chicago-ro Se1/1 IF-MIB.ifOutOctets = 0
Chicago-ro Se1/2 IF-MIB.ifInOctets = 11374963
Chicago-ro Se1/2 IF-MIB.ifOutOctets = 10454049
Chicago-ro Se1/3 IF-MIB.ifInOctets = 11409152

Case study

A customer used the mcalc command to export the utilisation data (bits in or out) from groups of interfaces for specific device groups, for the previous five minutes as an average:

mcalc avg time last5m ifrate * * /IF-MIB.if.*BitRate/ any group Circuit


mget

Use the mget command to test if an average has crossed a defined threshold.

For threshold examples, see Admin > Alerting > Threshold Alerts.

Use the following syntax:

mget last{duration} total|avg|nonzero
  [above|below {value}[%]] [time {time filter}]
  {type} {parent regex} {child regex} {attribute regex}
  [profile {profile name}] [any|all|not group {group name} ...]

Examples

Retrieve a list of devices in a group whose average ping RTTs have exceeded a specific value in a specific timeframe:

mget last1h avg above 10000 rtt * /ping/ * any group data-center2

Retrieve a list of interfaces in a group whose usage have exceeded a specific percentage in a specific timeframe:

mget last5m avg above 80% * * * /ifInUtil|ifOutUtil/ any group wan-links3

Retrieve a list of devices whose CPU usage have exceeded a specific percentage in a specific timeframe:

mget last5m avg above 60 * * * /CISCO-PROCESS-MIB.cpmCPU/


series

Use the series command to return time-series values for a selected time range.

Use the following syntax:

series [interval total|avg {secs}] time {time filter}
  {type} {parent regex} {child regex} {attribute regex}
  [profile {profile name}] [any|all|not group {group name} ...]

Example

Retrieve the total In/OutOctet values for an interface:

series interval total 3600 time yesterday counter swt250 Fa0/1 /InOctets|OutOctets/
swt250 Fa0/1 IF-MIB.ifHCInOctets = 2524672,2463360,2449920, 2447488,2486656,2488064,2457856,...
swt250 Fa0/1 IF-MIB.ifHCOutOctets = 975552,806976,803392, 822016,802496,894144,820480,820608,...

top

Use the top command to retrieve information on the highest number of events of a particular type within a selected time range.

Use the following syntax:

top {N} [reverse] [interval avg {secs}] total|max|avg|median {NN} time {time filter}
  {type} {parent regex} {child regex} {attribute regex}
  [profile {profile name}] [any|all|not group {group name} ...]

Example

Retrieve the interfaces with the highest In/OutOctets for yesterday:

top 20 total time yesterday counter * * /IF-MIB.if.*Octets/

cisco-74-1-12 Te1/1 IF-MIB.ifHCInOctets = 134374989234176
cisco-74-1-16 Te1/1/1 IF-MIB.ifHCOutOctets = 92564298924032
juniper-74-2-7 xe-0/0/10.0 IF-MIB.ifHCInOctets = 92329710977024
juniper-74-2-12 ae47.0 IF-MIB.ifHCOutOctets = 92308460535808
cisco-74-1-24 Ethernet1/23 IF-MIB.ifHCOutOctets = 89412016799744
cisco-74-1-24 Ethernet1/24 IF-MIB.ifHCOutOctets = 88919019356160
juniper-74-2-10 reth0.2213 IF-MIB.ifHCOutOctets = 88832066191360
arista-74-0-40 Ethernet5/6 IF-MIB.ifHCInOctets = 88685106167808
cisco-74-1-17 Po55.152 IF-MIB.ifHCOutOctets = 88431959736320
...