patricegautier / unifiZabbix

Zabbix templates to monitor pretty much all Unifi devices
181 stars 36 forks source link

mca-dump-short.sh SWITCH_DISCOVERY doesn't work on USW-Enterprise-8-POE #105

Closed mrrogers75 closed 1 year ago

mrrogers75 commented 1 year ago

Port discovery returns a blank response because the USW-Enterprise-8-POE requires a return sent after telnet 127.0.0.1 to get a prompt, and the prompt is not "(UBNT) >" but the switch name with #. It also doesn't require "enable" to be sent to get the configuration.

See example connection:

Device sw-myswitchname: Connecting Device sw-myswitchname: Connected

BusyBox v1.25.1 () built-in shell (ash)

.__. | | |__ |_ __/| | | / | || ) | | (c) 2010-2023 | | | | \ || \ | | Ubiquiti Inc. |__|| /||/ || |/ https://www.ui.com

  Welcome to UniFi USW-Enterprise-8-PoE!

***** NOTICE **

sw-myswitchname-US.6.5.32# cat /etc/board.info board.sysid=0xed41 board.name=USW-Enterprise-8-PoE board.shortname=US68P board.subtype= board.hwaddr=D021F96A4CAB board.reboot=135 board.upgrade=320 board.phycount=1 board.required_fw_version=5.46.0 sw-myswitchname-US.6.5.32# telnet 127.0.0.1

Entering character mode Escape character is '^]'.

sw-myswitchname#show running-config config-file-header sw-myswitchname v1.0.1.0 / ? CLI v1.0 @ ! unit-type-control-start unit-type unit 1 network tw uplink te unit-type-control-end ! vlan database vlan 4,73,180-181 exit dot1x mac-auth eap username groupsize 12 separator : uppercase no lldp med network-policy voice auto lldp med network-policy 1 voice vlan 73 vlan-type tagged

patricegautier commented 1 year ago

Ok that should be easy to include.. I don't have this model to test, so bear with me:

mrrogers75 commented 1 year ago

I changed line 229 to: -re "(USW-Aggregation|USW-Flex-XG|USW-Enterprise-8-PoE)\r\n" { and now it works. So yes that is a simple fix. Thanks

patricegautier commented 1 year ago

Sweet! Change committed..

-P

On Jul 19, 2023, at 11:10 AM, mrrogers75 @.***> wrote:

I changed line 229 to: -re "(USW-Aggregation|USW-Flex-XG|USW-Enterprise-8-PoE)\r\n" { and now it works. So yes that is a simple fix. Thanks

— Reply to this email directly, view it on GitHub https://github.com/patricegautier/unifiZabbix/issues/105#issuecomment-1642532717, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFHTJ5XPHIQRLA3Y4LVDVTXRAPJZANCNFSM6AAAAAA2QH2JTI. You are receiving this because you commented.