Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MikroTik RouterOS 'interface ethernet monitor name once' extend templatewith new values #1501

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,23 +1,74 @@
Value NAME (\S+)
Value STATUS (\S+)
Value AUTO_NEGOTIATION (\S+)
Value DEFAULT_CABLE_SETTINGS (\S+)
Value RATE (\S+)
Value FULL_DUPLEX (\S+)
Value TX_FLOW_CONTROL (\S+)
Value RX_FLOW_CONTROL (\S+)
Value COMBO_STATE (\S+)
Value SFP_MODULE_PRESENT (\S+)
Value SFP_RX_LOSS (\S+)
Value SFP_TX_FAULT (\S+)
Value SFP_TYPE (\S+)
Value SFP_CONNECTOR_TYPE (\S+)
Value SFP_LINK_LENGTH_9UM (\S+m)
Value SFP_LINK_LENGTH_50UM (\S+m)
Value SFP_LINK_LENGTH_62UM (\S+m)
Value SFP_LINK_LENGTH_COPPER (\S+m)
Value SFP_VENDOR_NAME (\S+)
Value SFP_VENDOR_PART_NUMBER (\S+)
Value SFP_VENDOR_REVISION (\S+)
Value SFP_VENDOR_SERIAL (\S+)
Value SFP_MANUFACTURING_DATE (\S+)
Value SFP_WAVELENGTH (\S+nm)
Value SFP_TEMPERATURE (\S+C)
Value SFP_SUPPLY_VOLTAGE (\S+V)
Value SFP_TX_BIAS_CURRENT (\S+mA)
Value SFP_TX_POWER (\S+dBm)
Value SFP_RX_POWER (\S+dBm)
Value EEPROM_CHECKSUM (\S+)
Value List EEPROM ([0-9a-f]+:(?:\s+[0-9a-f]{2})+.*)
Value ADVERTISING (\S+)
Value LINK_PARTNER_ADVERTISING (\S+)

Start
^\s*name:\s${NAME}
^\s*status:\s${STATUS}
^\s*auto-negotiation:\s${AUTO_NEGOTIATION}
^\s*default-cable-settings:\s${DEFAULT_CABLE_SETTINGS}
^\s*rate:\s${RATE}
^\s*full-duplex:\s${FULL_DUPLEX}
^\s*tx-flow-control:\s${TX_FLOW_CONTROL}
^\s*rx-flow-control:\s${RX_FLOW_CONTROL}
^\s*combo-state:\s${COMBO_STATE}
^\s*sfp-module-present:\s${SFP_MODULE_PRESENT}
^\s*sfp-rx-loss:\s${SFP_RX_LOSS}
^\s*sfp-tx-fault:\s${SFP_TX_FAULT}
^\s*sfp-type:\s${SFP_TYPE}
^\s*sfp-connector-type:\s${SFP_CONNECTOR_TYPE}
^\s*sfp-link-length-9um:\s${SFP_LINK_LENGTH_9UM}
^\s*sfp-link-length-50um:\s${SFP_LINK_LENGTH_50UM}
^\s*sfp-link-length-62um:\s${SFP_LINK_LENGTH_62UM}
^\s*sfp-link-length-copper:\s${SFP_LINK_LENGTH_COPPER}
^\s*sfp-vendor-name:\s${SFP_VENDOR_NAME}
^\s*sfp-vendor-part-number:\s${SFP_VENDOR_PART_NUMBER}
^\s*sfp-vendor-revision:\s${SFP_VENDOR_REVISION}
^\s*sfp-vendor-serial:\s${SFP_VENDOR_SERIAL}
^\s*sfp-manufacturing-date:\s${SFP_MANUFACTURING_DATE}
^\s*sfp-wavelength:\s${SFP_WAVELENGTH}
^\s*sfp-temperature:\s${SFP_TEMPERATURE}
^\s*sfp-supply-voltage:\s${SFP_SUPPLY_VOLTAGE}
^\s*sfp-tx-bias-current:\s${SFP_TX_BIAS_CURRENT}
^\s*sfp-tx-power:\s${SFP_TX_POWER}
^\s*sfp-rx-power:\s${SFP_RX_POWER}
^\s*eeprom-checksum:\s${EEPROM_CHECKSUM}
^\s*eeprom:\s${EEPROM}
^\s*${EEPROM}
^\s*advertising:\s*$$
^\s*advertising:\s${ADVERTISING}
^\s*link-partner-advertising:\s*$$
^\s*link-partner-advertising:\s${LINK_PARTNER_ADVERTISING}$$
^\s*(?:\d{2}:){2}\d{2}\s+echo:\s*.*$$ -> Next
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,27 @@ parsed_sample:
rx_flow_control: "no"
status: "link-ok"
tx_flow_control: "no"
default_cable_settings: ""
combo_state: ""
sfp_module_present: ""
sfp_rx_loss: ""
sfp_tx_fault: ""
sfp_type: ""
sfp_connector_type: ""
sfp_link_length_9um: ""
sfp_link_length_copper: ""
sfp_link_length_50um: ""
sfp_link_length_62um: ""
sfp_vendor_name: ""
sfp_vendor_part_number: ""
sfp_vendor_revision: ""
sfp_vendor_serial: ""
sfp_manufacturing_date: ""
sfp_wavelength: ""
sfp_temperature: ""
sfp_supply_voltage: ""
sfp_tx_bias_current: ""
sfp_tx_power: ""
sfp_rx_power: ""
eeprom_checksum: ""
eeprom: []
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,27 @@ parsed_sample:
rx_flow_control: ""
status: "no-link"
tx_flow_control: ""
default_cable_settings: ""
combo_state: ""
sfp_module_present: ""
sfp_rx_loss: ""
sfp_tx_fault: ""
sfp_type: ""
sfp_connector_type: ""
sfp_link_length_9um: ""
sfp_link_length_copper: ""
sfp_link_length_50um: ""
sfp_link_length_62um: ""
sfp_vendor_name: ""
sfp_vendor_part_number: ""
sfp_vendor_revision: ""
sfp_vendor_serial: ""
sfp_manufacturing_date: ""
sfp_wavelength: ""
sfp_temperature: ""
sfp_supply_voltage: ""
sfp_tx_bias_current: ""
sfp_tx_power: ""
sfp_rx_power: ""
eeprom_checksum: ""
eeprom: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: sfp-sfpplus24
status: link-ok
auto-negotiation: done
rate: 10Gbps
full-duplex: yes
tx-flow-control: no
rx-flow-control: no
advertising:
link-partner-advertising:
sfp-module-present: yes
sfp-rx-loss: no
sfp-tx-fault: no
sfp-type: SFP-or-SFP+
sfp-connector-type: LC
sfp-link-length-50um: 80m
sfp-link-length-62um: 30m
sfp-vendor-name: Mikrotik
sfp-vendor-part-number: S+85DLC03D
sfp-vendor-revision: A
sfp-vendor-serial: STST85S84700155
sfp-manufacturing-date: 18-12-07
sfp-wavelength: 850nm
sfp-temperature: 33C
sfp-supply-voltage: 3.251V
sfp-tx-bias-current: 6mA
sfp-tx-power: -2.843dBm
sfp-rx-power: -1.203dBm
eeprom-checksum: good
eeprom: 0000: 03 04 07 10 00 00 00 20 40 0c c0 06 67 00 00 00 ....... @...g...
0010: 08 03 00 1e 4d 69 6b 72 6f 74 69 6b 20 20 20 20 ....Mikr otik
0020: 20 20 20 20 00 00 00 00 53 2b 38 35 44 4c 43 30 .... S+85DLC0
0030: 33 44 20 20 20 20 20 20 41 20 20 20 03 52 00 45 3D A .R.E
0040: 00 1a 00 00 53 54 53 54 38 35 53 38 34 37 30 30 ....STST 85S84700
0050: 31 35 35 20 31 38 31 32 30 37 20 20 68 f0 05 b6 155 1812 07 h...
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0080: 64 00 d8 00 5f 00 dd 00 8c a0 6d 60 88 b8 71 48 d..._... ..m`..qH
0090: 1d 4c 00 fa 17 70 01 f4 31 2d 04 ea 27 10 06 30 .L...p.. 1-..'..0
00a0: 31 2d 01 3c 27 10 01 8e 00 00 00 00 00 00 00 00 1-.<'... ........
00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00c0: 00 00 00 00 3f 80 00 00 00 00 00 00 01 00 00 00 ....?... ........
00d0: 01 00 00 00 01 00 00 00 01 00 00 00 00 00 00 26 ........ .......&
00e0: 21 8a 7f 00 0c cd 14 4c 1d 9c 00 00 00 00 00 00 !......L ........
00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
parsed_sample:
- name: "sfp-sfpplus24"
status: "link-ok"
auto_negotiation: "done"
rate: "10Gbps"
full_duplex: "yes"
tx_flow_control: "no"
rx_flow_control: "no"
advertising: ""
link_partner_advertising: ""
default_cable_settings: ""
combo_state: ""
sfp_module_present: "yes"
sfp_rx_loss: "no"
sfp_tx_fault: "no"
sfp_type: "SFP-or-SFP+"
sfp_connector_type: "LC"
sfp_link_length_9um: ""
sfp_link_length_copper: ""
sfp_link_length_50um: "80m"
sfp_link_length_62um: "30m"
sfp_vendor_name: "Mikrotik"
sfp_vendor_part_number: "S+85DLC03D"
sfp_vendor_revision: "A"
sfp_vendor_serial: "STST85S84700155"
sfp_manufacturing_date: "18-12-07"
sfp_wavelength: "850nm"
sfp_temperature: "33C"
sfp_supply_voltage: "3.251V"
sfp_tx_bias_current: "6mA"
sfp_tx_power: "-2.843dBm"
sfp_rx_power: "-1.203dBm"
eeprom_checksum: "good"
eeprom: [
"0000: 03 04 07 10 00 00 00 20 40 0c c0 06 67 00 00 00 ....... @...g...",
"0010: 08 03 00 1e 4d 69 6b 72 6f 74 69 6b 20 20 20 20 ....Mikr otik",
"0020: 20 20 20 20 00 00 00 00 53 2b 38 35 44 4c 43 30 .... S+85DLC0",
"0030: 33 44 20 20 20 20 20 20 41 20 20 20 03 52 00 45 3D A .R.E",
"0040: 00 1a 00 00 53 54 53 54 38 35 53 38 34 37 30 30 ....STST 85S84700",
"0050: 31 35 35 20 31 38 31 32 30 37 20 20 68 f0 05 b6 155 1812 07 h...",
"0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........",
"0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........",
"0080: 64 00 d8 00 5f 00 dd 00 8c a0 6d 60 88 b8 71 48 d..._... ..m`..qH",
"0090: 1d 4c 00 fa 17 70 01 f4 31 2d 04 ea 27 10 06 30 .L...p.. 1-..'..0",
"00a0: 31 2d 01 3c 27 10 01 8e 00 00 00 00 00 00 00 00 1-.<'... ........",
"00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........",
"00c0: 00 00 00 00 3f 80 00 00 00 00 00 00 01 00 00 00 ....?... ........",
"00d0: 01 00 00 00 01 00 00 00 01 00 00 00 00 00 00 26 ........ .......&",
"00e0: 21 8a 7f 00 0c cd 14 4c 1d 9c 00 00 00 00 00 00 !......L ........",
"00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........"
]
Loading