Interface Counters Processor
The Interface Counters processor selects interfaces according to the configuration and outputs counter stats of the specified types (such as 'tx_bytes').
| Parameter | Description |
|---|---|
| Input Types | No inputs. This is a source processor. |
| Output Types | Table(number) |
| Counter Type (counter_type) | A type of an interface counter. enum of: tx_unicast_packets, tx_broadcast_packets, tx_multicast_packets, tx_bytes, tx_error_packets, tx_discard_packets, rx_unicast_packets, rx_broadcast_packets, rx_multicast_packets, rx_bytes, rx_error_packets, rx_discard_packets. |
| Graph Query (graph_query) |
One or more queries on graph specified as strings, or a list of such queries. (String will be deprecated in a future release.) Multiple queries should provide all the named nodes referenced by the expression fields (including additional_properties). Graph query is executed on the "operation" graph. Results of the queries can be accessed using the "query_result" variable with the appropriate index. For example, if querying property set nodes under name "ps", the result will be available as "query_result[0]["ps"]". In collector processors ( In other processors it is used for general parameterization and it is only supported as a list of queries.
graph_query: "node("system", role="leaf", name="system").
out("hosted_interfaces").
node("interface", name="iface").out("link").
node("link", role="spine_leaf")"
graph_query: ["node("system", role="leaf", name="system")",
"node("system", role="spine", name="system")"]
|
| Query Expansion | For every path, originally returned by graph queries, passed to each generator the latter one produces a set of items and for each item it produces a new path extended by a corresponding property name which value is set of a value of the produced item. |
| Query Group by (query_group_by) |
List (of strings) of node and relationship names used in the
graph query to group query results by. Each element in this list
represents a named node or relationship matcher in the
When grouping is active ( The following list describes the behavior for various values of this field:
|
| Query Tag Filter (query_tag_filter) | Filters named nodes in the graph queries by assigned tags. |
| Interface (interface) | Expression mapping from graph query to interface name, e.g. "iface.if_name" if "iface" is a name in the graph query. |
| System ID | Expression mapping from graph query to a system_id, e.g. "system.system_id" if "system" is a name in the graph query. |
| Additional Keys | Each additional key/value pair is used to extend properties of output stages where value is considered as an expression executed in context of the graph query and its result is used as a property value with respective key. The value of this property is evaluated for each item to associate items with metrics provided by a corresponding collector service. The association is done by keys because each collector reports a set of metrics where each metric is identified by a key in a format that is specific for each collector. |
Example: Interface Counter
graph_query: "node("system", name="system").out("hosted_interfaces").
node("interface", name="iface").out("link").
node("link", role="spine_leaf")"
counter_type: "rx_bytes"
system_id: "system.system_id"
interface: "interface.if_name"
role: "system.role"In this example, we create a NSS that has an entry for rx_bytes (per second) per every interface in the system. Each entry is implicitly tagged by "system_id" and "interface". Furthermore, as we have specified an additional property, each entry is also tagged by role of the system.
[system_id=spine1,role=spine,key=eth0]: 10 [system_id=spine2,role=spine,key=eth1]: 11 [system_id=leaf0,role=leaf, key=swp1]: 12