class Telemetry
The Telemetry
class provides a class implementation and methods for managing Telemetry
features on the node. This class presents an abstraction
Public Class Methods
clear_bst_cgsn_ctrs(conn)
click to toggle source
This API clears BST congestion drops.
parameters: conn - connection object to the node return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 272 def self.clear_bst_cgsn_ctrs(conn) url = form_url(conn, @@cfg + '/clear-cgsn-drop-counters') hdr = form_hdr(conn) Rest.get(conn, url, hdr) end
clear_bst_stats(conn)
click to toggle source
This API clear BST statistics.
parameters: conn - connection object to the node return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 259 def self.clear_bst_stats(conn) url = form_url(conn, @@cfg + '/bst/clear/statistics') hdr = form_hdr(conn) Rest.get(conn, url, hdr) end
clear_bst_threshold(conn)
click to toggle source
This API clears BST threshold.
parameters: conn - connection object to the node return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 246 def self.clear_bst_threshold(conn) url = form_url(conn, @@cfg + '/bst/clear/threshold') hdr = form_hdr(conn) Rest.get(conn, url, hdr) end
get_bst_feature(conn)
click to toggle source
This API gets BST information.
parameters: conn - connection object to the node return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 131 def self.get_bst_feature(conn) url = form_url(conn, @@cfg + '/bst/feature') hdr = form_hdr(conn) Rest.get(conn, url, hdr) end
get_bst_report(conn, params)
click to toggle source
This API gets BST report information.
parameters: conn - connection object to the node return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 194 def self.get_bst_report(conn, params) temp = @@cfg.dup temp.sub! 'cfg', 'info' url = form_url(conn, temp + '/bst/report') hdr = form_hdr(conn) params = params.to_json Rest.post(conn, url, hdr, params) end
get_bst_threshold(conn, params)
click to toggle source
This API gets BST threshold.
parameters: conn - connection object to the node return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 210 def self.get_bst_threshold(conn, params) url = form_url(conn, @@cfg + '/bst/threshold') hdr = form_hdr(conn) params = params.to_json Rest.post(conn, url, hdr, params) end
get_bst_tracking(conn)
click to toggle source
This API gets BST trackers and the tracking mode on the ASIC.
parameters: conn - connection object to the node return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 76 def self.get_bst_tracking(conn) url = form_url(conn, @@cfg + '/bst/tracking') hdr = form_hdr(conn) Rest.get(conn, url, hdr) end
get_sys_feature(conn)
click to toggle source
This API gets system switch properties.
parameters: conn - connection object to the node return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 36 def self.get_sys_feature(conn) url = form_url(conn, @@cfg + '/feature') hdr = form_hdr(conn) Rest.get(conn, url, hdr) end
set_bst_feature(conn, params)
click to toggle source
This API sets BST feature.
parameters: conn - connection object to the node params - dictionary that requires the following format of key-value pairs { "bstenable": 1, "sendasyncreports": 1, "collectioninterval": 300, "triggerratelimit": 5, "triggerratelimitinterval": 2, "sendsnapshotontrigger": 1, "asyncfullreports": 1, } description - bstenable :Set to 1 to enable BST, 0 to disable it. Enabling BST allows the switch to track buffer utilization statistics. sendasyncreports :Set to 1 to enable the transmission of periodic asynchronous reports, 0 to disable this feature. collectioninterval :The collection interval, in seconds. This defines how frequently periodic reports will be sent to the configured controller. triggerratelimit :The trigger rate limit, which defines the maximum number of threshold‐driven triggered reports that the agent is allowed to send to the controller per triggerratelimitinterval; an integer from 1‐5. triggerratelimit-interval :The trigger rate limit interval, in seconds; an integer from 10‐60. sendsnapshotontrigger :Set to 1 to enable sending a complete snapshot of all buffer statistics counters when a trigger happens, 0 to disable this feature. asyncfullreport :Set to 1 to enable the async full report feature, 0 to disable it. When this feature is enabled, the agent sends full reports containing data related to all counters. When the feature is disabled, the agent sends incremental reports containing only the counters that have changed since the last report. return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 180 def self.set_bst_feature(conn, params) url = form_url(conn, @@cfg + '/bst/feature') hdr = form_hdr(conn) params = params.to_json Rest.put(conn, url, hdr, params) end
set_bst_threshold(conn, params)
click to toggle source
This API sets BST threshold to trigger BST reports.
parameters: conn - connection object to the node params - dictionary that requires the following format of key-value pairs for the realms given in description { "realm": "ingressservicepool", "servicepool" : 0, "umsharethreshold" : 70 } description - return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 232 def self.set_bst_threshold(conn, params) url = form_url(conn, @@cfg + '/bst/threshold') hdr = form_hdr(conn) params = params.to_json Rest.put(conn, url, hdr, params) end
set_bst_tracking(conn, params)
click to toggle source
This API sets BST trackers and the tracking mode on the ASIC.
parameters: conn - connection object to the node params - dictionary that requires the following format of key-value pairs { "trackpeakstats" : 1, "trackingressportprioritygroup" : 1, "trackingressportservicepool" : 1, "trackingressservicepool" : 1, "trackegressportservicepool" : 1, "trackegressservicepool" : 1, "trackegressrqequeue" : 1, "trackdevice" : 1 } description - trackpeakstats :Set to 1 to peak statistics tracking, 0 to disable this feature trackingressportprioritygroup:Set to 1 to enable ingress port priority group tracking, 0 to disable this feature trackingressportservicepool :Set to 1 to enable ingress port service pool tracking, 0 to disable this feature trackingressservicepool :Set to 1 to enable ingress service pool tracking, 0 to disable this feature trackegressportservicepool :Set to 1 to enable egress port service pool tracking, 0 to disable this feature trackegressservicepool :Set to 1 to enable egress service pool tracking, 0 to disable this feature trackegressrqequeue :Set to 1 to enable egress RQE queue tracking, 0 to disable this feature trackdevice :Set to 1 to enable tracking of this device, 0 to disable this feature return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 117 def self.set_bst_tracking(conn, params) url = form_url(conn, @@cfg + '/bst/tracking') hdr = form_hdr(conn) params = params.to_json Rest.put(conn, url, hdr, params) end
set_sys_feature(conn, params)
click to toggle source
This API sets system feature.
parameters: conn - connection object to the node params - dictionary that requires the following format of key-value pairs { "heartbeatenable" : 1, "msginterval" : 10 } description - heartbeat-enable :When enabled, the Agent asynchronously sends the registration and heartbeat message to the collector. One of: 0: disable heartbeat 1: enable heartbeat (default value) msg-interval :Determines the interval with which the registration and heartbeat messages are sent to the collector; units of seconds from 1‐600. Default value: 5 seconds. return: JSON response
# File lib/cnos-rbapi/telemetry.rb, line 62 def self.set_sys_feature(conn, params) url = form_url(conn, @@cfg + '/feature') hdr = form_hdr(conn) params = params.to_json Rest.put(conn, url, hdr, params) end