-
Notifications
You must be signed in to change notification settings - Fork 35
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
Broken Pipe #128
Comments
would be great to know the rest of this error message: '{ "at":"06:02:36", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars..' if you look in /tmp/mcaDump.err on your zabbix server, can you find the rest? |
Apologizes, see below. I use the following switches and they all seem to have the same problem when using the current mca dump from the master branch. I roll back to using an older mca dump from earlier last year/2023 it seems to work without issue.
I redacted all my host IPs with "ip_host"
|
I added the command invocation to mcaDump.err.. Can you update mcaDump, reproduce the problem and look at mcaDump.err again?
That will give the command invocation to hopefully reproduce the problem from the command line;
Adding -v to the invocation should give me all the info I need..
Thanks,
-P
… On Jan 22, 2025, at 2:03 PM, UntestedEngineer ***@***.***> wrote:
Apologizes, see below.
I use the following switches and they all seem to have the same problem when using the current mca dump from the master branch
USW Enterprise 8 PoE
US XG 16
US XG 6 PoE
USW Flex XG
I redacted all my host IPs with "ip_host"
----------------------------------
Wed Jan 22 21:33:34 UTC 2025 ip_host
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: parse error: Invalid numeric literal at line 1, column 14", "device":"ip_host", "mcaDumpError":"Error" }
----------------------------------
----------------------------------
Wed Jan 22 21:33:34 UTC 2025 ip_host
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: parse error: Invalid numeric literal at line 1, column 14", "device":"ip_host", "mcaDumpError":"Error" }
----------------------------------
----------------------------------
Wed Jan 22 21:33:35 UTC 2025 ip_host
{ "at":"21:33:35", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: parse error: Invalid numeric literal at line 1, column 14", "device":"ip_host", "mcaDumpError":"Error" }
----------------------------------
----------------------------------
Wed Jan 22 21:33:37 UTC 2025 ip_host
{ "at":"21:33:37", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: parse error: Invalid numeric literal at line 1, column 14", "device":"ip_host", "mcaDumpError":"Error" }
----------------------------------
----------------------------------
Wed Jan 22 21:33:38 UTC 2025 ip_host
{ "at":"21:33:38", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: parse error: Invalid numeric literal at line 1, column 14", "device":"ip_host", "mcaDumpError":"Error" }
----------------------------------
----------------------------------
Wed Jan 22 21:33:38 UTC 2025 ip_host
{ "at":"21:33:38", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: parse error: Invalid numeric literal at line 1, column 14", "device":"ip_host", "mcaDumpError":"Error" }
----------------------------------
----------------------------------
Wed Jan 22 21:35:32 UTC 2025 ip_host
{ "at":"21:35:32", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: parse error: Invalid numeric literal at line 1, column 14", "device":"ip_host", "mcaDumpError":"Error" }
----------------------------------
----------------------------------
Wed Jan 22 21:35:33 UTC 2025 ip_host
{ "at":"21:35:33", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: parse error: Invalid numeric literal at line 1, column 14", "device":"ip_host", "mcaDumpError":"Error" }
----------------------------------
----------------------------------
Wed Jan 22 21:35:34 UTC 2025 ip_host
{ "at":"21:35:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: parse error: Invalid numeric literal at line 1, column 14", "device":"ip_host", "mcaDumpError":"Error" }
----------------------------------
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.['system-stats'].cpu": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:load_avg_1mn" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.sys_stats.loadavg_1": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:load_avg_5mn" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.sys_stats.loadavg_5": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:load_avg_15mn" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.sys_stats.loadavg_15": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:mac_address" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.mac": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:mem_total" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.sys_stats.mem_total": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:mem_used" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.sys_stats.mem_used": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:model" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.model_display": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:total_rx_bandwidth" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.port_table[*].rx_bytes.sum()": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:total_tx_bandwidth" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.port_table[*].tx_bytes.sum()": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:uptime" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.uptime": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:_[overheating]" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.overheating": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:_[temperature]" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.general_temperature": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
302:20250122:213334.676 item "Basement Infrastructure Switch 1:_[fan_level]" became not supported: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
1. Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe.{ "at...
2. Failed: cannot extract value from json by path "$.fan_level": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe
{ "at":"21:33:34", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
—
Reply to this email directly, view it on GitHub <#128 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJFHTJ24XFWTBGYYF3ZN6SL2MAIUZAVCNFSM6AAAAABVRW57ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBYGM3DIMRUGE>.
You are receiving this because you commented.
|
See below. I redacted any IPs/MACs, RSA keys and usernames:
|
Mm.. no new clue here. Did you update mca-dump-short.sh to the latest?
-P
… On Jan 24, 2025, at 8:47 AM, UntestedEngineer ***@***.***> wrote:
See below. I redacted any IPs/MACs, RSA keys and usernames:
----------------------------------
Fri Jan 24 16:29:35 UTC 2025 switch_ip
-d switch_ip -u username -i /var/lib/zabbix/ssh_keys/zb_id_rsa -t SWITCH -p {$UNIFI_SSHPASS_PASSWORD_PATH} -U -vvv -o 30 -b
{ "at":"16:29:35", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: parse error: Invalid numeric literal at line 1, column 14", "device":"switch_ip", "mcaDumpError":"Error" }
----------------------------------
Fri Jan 24 16:29:35 UTC 2025 switch_ip
-d switch_ip -u username -i /var/lib/zabbix/ssh_keys/zb_id_rsa -t SWITCH -p {$UNIFI_SSHPASS_PASSWORD_PATH} -U -vvv -o 30 -b
OpenSSH_9.6p1 Ubuntu-3ubuntu13.5, OpenSSL 3.0.13 30 Jan 2024
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname switch_ip is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/var/lib/zabbix/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/var/lib/zabbix/.ssh/known_hosts2'
debug3: channel_clear_timeouts: clearing
debug3: ssh_connect_direct: entering
debug1: Connecting to switch_ip [switch_ip] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug2: fd 3 setting O_NONBLOCK
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug3: timeout: 5000 ms remain after connect
debug1: identity file /var/lib/zabbix/ssh_keys/zb_id_rsa type 0
debug1: identity file /var/lib/zabbix/ssh_keys/zb_id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.5
debug1: Remote protocol version 2.0, remote software version dropbear_2022.83
debug1: compat_banner: no match: dropbear_2022.83
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to switch_ip:22 as 'username'
debug3: record_hostkey: found key type RSA in file /var/lib/zabbix/.ssh/known_hosts:4
debug3: load_hostkeys_file: loaded 1 keys from switch_ip
debug1: load_hostkeys: fopen /var/lib/zabbix/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: prefer hostkeyalgs: ***@***.******@***.***,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: ***@***.******@***.******@***.***
debug2: host key algorithms: ***@***.******@***.******@***.******@***.******@***.******@***.******@***.******@***.******@***.******@***.***
debug2: ciphers ctos: ***@***.******@***.******@***.***
debug2: ciphers stoc: ***@***.******@***.******@***.***
debug2: MACs ctos: ***@***.******@***.******@***.******@***.******@***.******@***.******@***.***,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: ***@***.******@***.******@***.******@***.******@***.******@***.******@***.***,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: ***@***.***,zlib
debug2: compression stoc: ***@***.***,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: ***@***.******@***.******@***.***
debug2: host key algorithms: rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: ***@***.***,aes128-ctr,aes256-ctr
debug2: ciphers stoc: ***@***.***,aes128-ctr,aes256-ctr
debug2: MACs ctos: hmac-sha1,hmac-sha2-256
debug2: MACs stoc: hmac-sha1,hmac-sha2-256
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug3: kex_choose_conf: will use strict KEX ordering
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-256
debug1: kex: server->client cipher: ***@***.*** MAC: <implicit> compression: none
debug1: kex: client->server cipher: ***@***.*** MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: key
debug3: record_hostkey: found key type RSA in file /var/lib/zabbix/.ssh/known_hosts:4
debug3: load_hostkeys_file: loaded 1 keys from switch_ip
debug1: load_hostkeys: fopen /var/lib/zabbix/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'switch_ip' is known and matches the RSA host key.
debug1: Found key in /var/lib/zabbix/.ssh/known_hosts:4
debug3: send packet: type 21
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug2: ssh_set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug2: ssh_set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug3: kex_input_ext_info: extension server-sig-algs
debug1: kex_ext_info_client_parse: ***@***.******@***.***,rsa-sha2-256,ssh-rsa,ssh-dss>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-with-mic,publickey
debug3: authmethod_lookup publickey
debug3: remaining preferred: ,publickey
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Will attempt key: /var/lib/zabbix/ssh_keys/zb_id_rsa key explicit
debug2: pubkey_prepare: done
debug1: Offering public key: /var/lib/zabbix/ssh_keys/zb_id_rsa key explicit
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: /var/lib/zabbix/ssh_keys/zb_id_rsa key explicit
debug3: sign_and_send_pubkey: using publickey with key
debug3: sign_and_send_pubkey: signing using rsa-sha2-256 key
debug3: send packet: type 50
debug3: receive packet: type 52
Authenticated to switch_ip ([switch_ip]:22) using "publickey".
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Entering interactive session.
debug1: pledge: filesystem
debug3: client_repledge: enter
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: set_sock_tos: set socket 3 IP_TOS 0x08
debug2: client_session2_setup: id 0
debug1: Sending environment.
debug3: Ignored env KUBERNETES_SERVICE_PORT_HTTPS
debug3: Ignored env KUBE_STATE_METRICS_PORT_8080_TCP_ADDR
debug3: Ignored env ZABBIX_USER_HOME_DIR
debug3: Ignored env DEBUG_MODE
debug3: Ignored env KUBERNETES_SERVICE_PORT
debug3: Ignored env ZABBIX_WEB_PORT_8080_TCP_PORT
debug3: Ignored env GRAFANA_SVC_TCP_PORT
debug3: Ignored env ZABBIX_WEB_PORT
debug3: Ignored env HOSTNAME
debug3: Ignored env MIBS
debug3: Ignored env GRAFANA_SVC_TCP_PORT_3000_TCP
debug3: Ignored env PROMETHEUS_SVC_TCP_SERVICE_HOST
debug3: Ignored env ZABBIX_WEB_SERVICE_HOST
debug3: Ignored env ZABBIX_SERVER_SERVICE_PORT
debug3: Ignored env NMAP_PRIVILEGED
debug3: Ignored env ZABBIX_SERVER_PORT_10051_TCP_PORT
debug3: Ignored env ZABBIX_WEB_PORT_8080_TCP_PROTO
debug3: Ignored env ZABBIX_SERVER_PORT_10051_TCP_ADDR
debug3: Ignored env PWD
debug3: Ignored env KUBE_STATE_METRICS_PORT_8080_TCP_PORT
debug3: Ignored env ZABBIX_WEB_SERVICE_PORT
debug3: Ignored env PROMETHEUS_SVC_TCP_PORT_80_TCP
debug3: Ignored env GRAFANA_SVC_TCP_SERVICE_HOST
debug3: Ignored env ZABBIX_SERVER_PORT_10051_TCP_PROTO
debug3: Ignored env KUBE_STATE_METRICS_PORT
debug3: Ignored env HOME
debug3: Ignored env KUBERNETES_PORT_443_TCP
debug3: Ignored env PROMETHEUS_SVC_TCP_SERVICE_PORT_WEB
debug3: Ignored env KUBE_STATE_METRICS_PORT_8080_TCP_PROTO
debug3: Ignored env PROMETHEUS_SVC_TCP_PORT_80_TCP_ADDR
debug3: Ignored env ZABBIX_SERVER_SERVICE_PORT_ZABBIX_TRAPPER
debug3: Ignored env KUBE_STATE_METRICS_SERVICE_PORT_METRICS
debug3: Ignored env GRAFANA_SVC_TCP_PORT_3000_TCP_ADDR
debug3: Ignored env PROMETHEUS_SVC_TCP_PORT
debug3: Ignored env GRAFANA_SVC_TCP_PORT_3000_TCP_PROTO
debug3: Ignored env TERM
debug3: Ignored env PROMETHEUS_SVC_TCP_PORT_80_TCP_PROTO
debug3: Ignored env ZABBIX_SERVER_SERVICE_HOST
debug3: Ignored env ZABBIX_SERVER_PORT_10051_TCP
debug3: Ignored env MIBDIRS
debug3: Ignored env SHLVL
debug3: Ignored env KUBE_STATE_METRICS_SERVICE_HOST
debug3: Ignored env KUBERNETES_PORT_443_TCP_PROTO
debug3: Ignored env KUBE_STATE_METRICS_SERVICE_PORT
debug3: Ignored env KUBERNETES_PORT_443_TCP_ADDR
debug3: Ignored env ZABBIX_WEB_PORT_8080_TCP
debug3: Ignored env KUBE_STATE_METRICS_PORT_8080_TCP
debug3: Ignored env ZABBIX_CONF_DIR
debug3: Ignored env ZABBIX_WEB_SERVICE_PORT_WEB_HTTP
debug3: Ignored env ZABBIX_WEB_PORT_8080_TCP_ADDR
debug3: Ignored env KUBERNETES_SERVICE_HOST
debug3: Ignored env PROMETHEUS_SVC_TCP_SERVICE_PORT
debug3: Ignored env KUBERNETES_PORT
debug3: Ignored env KUBERNETES_PORT_443_TCP_PORT
debug3: Ignored env ZABBIX_SERVER_PORT
debug3: Ignored env PATH
debug3: Ignored env GRAFANA_SVC_TCP_PORT_3000_TCP_PORT
debug3: Ignored env VERBOSE_SSH
debug3: Ignored env PROMETHEUS_SVC_TCP_PORT_80_TCP_PORT
debug3: Ignored env GRAFANA_SVC_TCP_SERVICE_PORT
debug3: Ignored env _
debug1: Sending command: sleep 1; mca-dump
debug2: channel 0: request exec confirm 1
debug3: send packet: type 98
debug3: client_repledge: enter
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 24576 rmax 32759
debug2: channel 0: read failed rfd 4 maxlen 24576: Broken pipe
debug2: channel 0: read failed
debug2: chan_shutdown_read: channel 0: (i0 o0 sock -1 wfd 4 efd 6 [write])
debug2: channel 0: input open -> drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug3: send packet: type 96
debug2: channel 0: input drain -> closed
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0
debug3: receive packet: type 96
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug3: receive packet: type 97
debug2: channel 0: rcvd close
debug3: channel 0: will not send data after close
{
"anon_id": "09bff330-134f-4046-8488-c7c893cc51f6",
"architecture": "armv7l",
"ble_caps": 0,
"board_rev": 22,
"bomrev": "113-03166-22",
"bomrev_id": "000c5e16",
"boot": {
"id": "66a5377b-2826-47d2-8364-1d50b679a1d1"
},
"bootid": 1,
"bootrom_version": "unknown",
"cfgversion": "0acfe8bfa809ddab",
"connect_request_ip": "controller_ip",
"connect_request_port": "54876",
"default": false,
"dhcp_server_table": [
{
"blocked": false,
"ip": "ip",
"last_seen": 0,
"mac": "mac",
"port_idx": 5,
"vlan": 4003
},
{
"blocked": false,
"ip": "ip",
"last_seen": 0,
"mac": "mac",
"port_idx": 5,
"vlan": 4000
},
{
"blocked": false,
"ip": "ip",
"last_seen": 0,
"mac": "mac",
"port_idx": 5,
"vlan": 2001
}
],
"discovery_response": false,
"dualboot": true,
"ever_crash": false,
"fw2_caps": 65536,
"fw_caps": 2806560293,
"gateway_ip": "gateway_ip",
"gateway_mac": "mac",
"guest_kicks": 0,
"guest_token": "token",
"has_eth1": false,
"has_fan": false,
"has_speaker": false,
"has_temperature": false,
"hash_id": "hash",
"hostname": "BasementDesktopSwitch3",
"hw_caps": 0,
"if_table": [
{
"full_duplex": true,
"ip": "switch_ip",
"mac": "mac",
"name": "eth0",
"netmask": "255.255.255.0",
"num_port": 5,
"rx_bytes": 65176193,
"rx_dropped": 0,
"rx_errors": 0,
"rx_multicast": 0,
"rx_packets": 682347,
"speed": 10,
"tx_bytes": 143582261,
"tx_dropped": 0,
"tx_errors": 0,
"tx_packets": 471306,
"up": true
}
],
"inform_min_interval": 30,
"inform_url": "http://inform_ip:8080/inform",
"internet": true,
"ip": "switch_ip",
"ipv6": [],
"isolated": false,
"kernel_version": "4.4.52",
"last_error_conns": [
{
"error_reason": 11,
"last_error_str": "Waiting for sshd (http://inform_ip:8080/inform)",
"last_managed_e_time": 0,
"last_managed_s_time": 0,
"timestamp": "2024-09-26T15:36:24"
},
{
"error_reason": 4,
"last_error_str": "Timeout (http://inform_ip:8080/inform)",
"last_managed_e_time": 0,
"last_managed_s_time": 161,
"timestamp": "2025-01-22T11:13:11"
},
{
"error_reason": 7,
"last_error_str": "Server Busy (http://inform_ip:8080/inform)",
"last_managed_e_time": 0,
"last_managed_s_time": 161,
"timestamp": "2025-01-22T11:13:16"
}
],
"lldp_table": [
{
"chassis_id": "id",
"is_wired": true,
"local_port_idx": 5,
"local_port_name": "Port 5",
"port_id": "te4"
}
],
"locating": false,
"mac": "mac",
"manufacturer_id": 2,
"model": "USFXG",
"model_display": "USW-Flex-XG",
"netmask": "255.255.255.0",
"overheating": false,
"port_table": [
{
"autoneg": false,
"dot1x_mode": "force_auth",
"dot1x_status": "authorized",
"enable": true,
"flowctrl_rx": false,
"flowctrl_tx": false,
"full_duplex": false,
"is_uplink": false,
"jumbo": true,
"mac_table": [],
"mac_table_count": 0,
"media": "GE",
"poe_caps": 0,
"port_idx": 1,
"port_poe": false,
"rx_broadcast": 0,
"rx_bytes": 0,
"rx_dropped": 0,
"rx_errors": 0,
"rx_multicast": 0,
"rx_packets": 0,
"satisfaction": 100,
"satisfaction_reason": 0,
"speed": 0,
"speed_caps": 1048623,
"stp_pathcost": 2000000,
"stp_state": "disabled",
"tx_broadcast": 0,
"tx_bytes": 0,
"tx_dropped": 0,
"tx_errors": 0,
"tx_multicast": 0,
"tx_packets": 0,
"up": false
},
{
"autoneg": false,
"dot1x_mode": "force_auth",
"dot1x_status": "authorized",
"enable": true,
"flowctrl_rx": false,
"flowctrl_tx": false,
"full_duplex": false,
"is_uplink": false,
"jumbo": true,
"mac_table": [],
"mac_table_count": 0,
"media": "10GE",
"poe_caps": 0,
"port_idx": 2,
"port_poe": false,
"rx_broadcast": 592,
"rx_bytes": 460809,
"rx_dropped": 0,
"rx_errors": 0,
"rx_multicast": 203,
"rx_packets": 2327,
"satisfaction": 100,
"satisfaction_reason": 0,
"speed": 0,
"speed_caps": 1049068,
"stp_pathcost": 2000000,
"stp_state": "disabled",
"tx_broadcast": 15,
"tx_bytes": 20699,
"tx_dropped": 0,
"tx_errors": 0,
"tx_multicast": 22,
"tx_packets": 173,
"up": false
},
{
"autoneg": false,
"dot1x_mode": "force_auth",
"dot1x_status": "authorized",
"enable": true,
"flowctrl_rx": false,
"flowctrl_tx": false,
"full_duplex": false,
"is_uplink": false,
"jumbo": true,
"mac_table": [],
"mac_table_count": 0,
"media": "10GE",
"poe_caps": 0,
"port_idx": 3,
"port_poe": false,
"rx_broadcast": 0,
"rx_bytes": 0,
"rx_dropped": 0,
"rx_errors": 0,
"rx_multicast": 0,
"rx_packets": 0,
"satisfaction": 100,
"satisfaction_reason": 0,
"speed": 0,
"speed_caps": 1049068,
"stp_pathcost": 2000000,
"stp_state": "disabled",
"tx_broadcast": 0,
"tx_bytes": 0,
"tx_dropped": 0,
"tx_errors": 0,
"tx_multicast": 0,
"tx_packets": 0,
"up": false
},
{
"autoneg": false,
"dot1x_mode": "force_auth",
"dot1x_status": "authorized",
"enable": true,
"flowctrl_rx": false,
"flowctrl_tx": false,
"full_duplex": false,
"is_uplink": false,
"jumbo": true,
"mac_table": [],
"mac_table_count": 0,
"media": "10GE",
"poe_caps": 0,
"port_idx": 4,
"port_poe": false,
"rx_broadcast": 0,
"rx_bytes": 0,
"rx_dropped": 0,
"rx_errors": 0,
"rx_multicast": 0,
"rx_packets": 0,
"satisfaction": 100,
"satisfaction_reason": 0,
"speed": 0,
"speed_caps": 1049068,
"stp_pathcost": 2000000,
"stp_state": "disabled",
"tx_broadcast": 0,
"tx_bytes": 0,
"tx_dropped": 0,
"tx_errors": 0,
"tx_multicast": 0,
"tx_packets": 0,
"up": false
},
{
"autoneg": true,
"dot1x_mode": "force_auth",
"dot1x_status": "authorized",
"enable": true,
"flowctrl_rx": true,
"flowctrl_tx": true,
"full_duplex": true,
"is_uplink": true,
"jumbo": true,
"mac_table": [
{
"age": 9,
"ip": "ip",
"mac": "mac",
"static": false,
"uptime": 473256,
"vlan": 3996
},
{
"age": 141,
"mac": "mac",
"static": false,
"uptime": 141,
"vlan": 4000
},
{
"age": 9,
"ip": "ip",
"mac": "mac",
"static": false,
"uptime": 472844,
"vlan": 3996
}
],
"mac_table_count": 3,
"media": "10GE",
"poe_caps": 0,
"port_idx": 5,
"port_poe": false,
"rx_broadcast": 2873832,
"rx_bytes": 474219747,
"rx_dropped": 0,
"rx_errors": 0,
"rx_multicast": 1218469,
"rx_packets": 4549595,
"satisfaction": 100,
"satisfaction_reason": 0,
"speed": 10000,
"speed_caps": 1049068,
"stp_pathcost": 2000,
"stp_state": "forwarding",
"tx_broadcast": 70462,
"tx_bytes": 155767663,
"tx_dropped": 0,
"tx_errors": 0,
"tx_multicast": 16757,
"tx_packets": 513234,
"up": true
}
],
"power_source": "262144",
"reboot_duration": 135,
"required_version": "5.46.0",
"root_switch": "mac",
"satisfaction": 100,
"satisfaction_reason": 0,
"selfrun_beacon": true,
"serial": "serial",
"service_mac": "mac",
"ssh_session_table": [],
"state": 2,
"stats_inform_interval": 1,
"stp_priority": 12288,
"stream_token": "",
"switch_caps": {
"etherlight_caps": 0,
"feature_caps": 68725758,
"lag_group": [
{
"port_range": "1-1"
},
{
"port_range": "2-5"
}
],
"max_acl_port_range": 4,
"max_aggregate_sessions": 2,
"max_class_maps": 0,
"max_custom_ip_acls": 12,
"max_custom_mac_acls": 10,
"max_global_acls": 128,
"max_l3_intf": 0,
"max_mac_based_vlan_count": 256,
"max_mirror_sessions": 1,
"max_qos_profiles": 0,
"max_reserved_routes": 0,
"max_static_routes": 0,
"max_vlan_count": 1000
},
"sys_error_caps": 0,
"sys_stats": {
"loadavg_1": "0.00",
"loadavg_15": "0.03",
"loadavg_5": "0.06",
"mem_buffer": 0,
"mem_total": 460693504,
"mem_used": 252215296
},
"sysid": 60736,
"system-stats": {
"cpu": "1.7",
"mem": "54.7",
"uptime": "473358"
},
"time": 1737736175,
"time_ms": 470,
"timestamp": "2025-01-24T11:29:35",
"tm_ready": true,
"total_mac_in_used": 3,
"total_max_power": 0,
"upgrade_duration": 320,
"uplink": "eth0",
"uptime": 473380,
"uptime_str": "5d11h29m40s",
"version": "7.1.26.15869"
}
debug3: channel 0: will not send data after close
debug2: channel 0: obuf empty
debug2: chan_shutdown_write: channel 0: (i3 o1 sock -1 wfd 5 efd 6 [write])
debug2: channel 0: output drain -> closed
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug3: send packet: type 97
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 [session] r0 i3/0 o3/0 e[write]/0 fd -1/-1/6 sock -1 cc -1 io 0x00/0x00)
debug3: send packet: type 1
Transferred: sent 3228, received 17568 bytes, in 1.1 seconds
Bytes per second: sent 2911.7, received 15846.3
debug1: Exit status 0
—
Reply to this email directly, view it on GitHub <#128 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJFHTJ3RG7IJI76M7ZPKMMT2MJVBPAVCNFSM6AAAAABVRW57ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJSHE3DIOJXHE>.
You are receiving this because you commented.
|
Yes, I just downloaded the zip file from the current master branch and created a kubernetes configmap from the command line:
|
Ok one more time if you wouldn't mind.. Please update mca-dump-short and reproduce again.. |
Here is the output from the Kubernetes pod logs (first snippet) and then the mcaDumpShort.err snippet underneath. This time I am provided the entire contents of mcaDumpShort.err instead of just a few lines that looked of interest. As with the last update I redacted all IPs (replaced with "ip"), MACs (replaced with "mac"), RSA keys (replaced with "redacted". I also redacted all hostnames replaced with "hostname". Files are too long to paste so I uploaded them. By comparison see below file for an older version of mca-dump-short.sh that appears to still work without issue but does not have the updated code that you have put in over the past several commits. When I look at the tmp directory on the zabbix server (pod) I can see the jq files for the port print outs when using the old mca-dump-short.sh file:
It's not there when I use the new mca-dump-short.sh file, but instead the mcadumpshort.err |
Ok one more try to get better output. Can you please update mca-dump-short again, and from the command line on your zabbix server: 1- check SSH connectivity to the switch 2- run Thanks |
See attached and snippets.
|
the plot thickens.. Looks to me that everything is ok when invoked on the command line (except the output's line length was capped, but I am going to chalk that off to GitHub somewhere). I also have a flex-xg here and it works fine. It's on firmware 7.1.26 for what it's worth.. |
How do you run your zabbix server? In a container or monolithic? Every time you update the shell script I download, delete the configmap then run:
Afterwards I cycle the pod/deployment. I even tried removing the yaml templates and readding. |
In a docker container..
I think the script is getting updated correctly, I see updated logs. So what’s the latest in the zabbix logs and the mcaDump.err for the one switch we checked?
… On Jan 26, 2025, at 4:24 PM, UntestedEngineer ***@***.***> wrote:
How do you run your zabbix server? In a container or monolithic?
Every time you update the shell script I download, delete the configmap then run:
kubectl create configmap zabbix-externalscripts-conf --from-file=mca-dump-short.sh --from-file=ssh-run.sh -n monitoring
Afterwards I cycle the pod/deployment.
I even tried removing the yaml templates and readding.
—
Reply to this email directly, view it on GitHub <#128 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJFHTJ6CRQIPJQYZZZ67OYD2MV4CXAVCNFSM6AAAAABVRW57ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJUGY2TKNBYGE>.
You are receiving this because you commented.
|
Each time you ask me to test I remove the configmap and create it with the new mca file. I cycle the pod then provide the logs. Afterwards I remove the config map and recreate it with an older known working one referenced in a prior update so I don't have the consistent failures.
|
Understood. To be clear, when you are reproducing the problem with the latest mca-dump-short, you are still seeing that same error in mcaDump.err: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 438: echo: write error: Broken pipe |
Yes, Unless Kubernetes is messing up the configmap upon creation with spacing issues,, however I have done this in the past and I don't see any issues with the configmap.
When I run the following command manually from the container shell:
When I roll back to the older mca-dump-short.sh file that I referenced in this issue invoking this command manually produces the list of ports and related info. I also manually invoked SWITCH and SWITCH_FEATURE_DISCOVERY from the container shell and those return expected jq output, but the SWITCH_DISCOVERY has this weird issue. |
to be honest I am fishing a bit here, but you might try the latest mca-dump and see if it changes anything.. |
btw is there anything notable about the configuration of those switches? special firmware? lots of clients?... |
The issue is still present when using the code from commit: There is nothing fancy about my switches. I have:
All six switches are running 7.1.26. The US-16-XG are the STP root of the network with one a lower STP cost than the other. The USW-Enterprise-8POE sit downstream of the US-16-XG and are multihomed to each US-16-XG (one port is STP blocking. The USW-Flex-10G sit downstream of the US-16-XG where each Flex is single homed to a US-16-XG and the Flex are chain together with an STP block on one side. The (4) U6-Enterprise are split 2 and 2 between the USW-Enterprise-8POE. I have 20 VLANs defined and all of my switch to switch links are Trunk ports allowing all VLANs. Ports facing the APs on the USW-Enterprise-8POE allow only the specific SSID VLANs. Firewall (Fortigate IP Gateway) uplinks on the US-16-XG are set to Trunk allowing all VLANs. All the rest of the ports connected to the switches with clients are tagged for relevant Access VLAN for non-tagging on the host level. Client Statistics: The Unifi Switch templates I am using have the following Preprocessing and LLD Macros. And to note, as soon as I roll back to an older mca-dump-short.sh file I have no issues. The jq script appears to only be failing on SWITCH_DISCOVERY for all switches I listed above, not just the USW-Flex-10G. The "SWITCH" and "SWITCH_FEATURE_DISCOVERY" is successful. |
Ok the SWITCH_DISCOVERY bit I think it the smoking gun.. I fixed a couple of bugs in this area. They don't exactly explain the symptoms you are seeing, but are definitely in the right area.. Can you try the latest again? please run mca-dump-short.sh -t SWITCH_DISCOVERY from the command line on each of the switches to see if it behaves correctly now. It's also likely I need to update the list of switch models in the script, so if you send me the contents of /etc/board.info from the switches that were misbehaving that would be great Thanks! |
Decided to update the application running in my container from last year. When I recreated the Kubernetes config-map that mounts into the container I now receive the following:
{ "at":"06:02:36", "r":"jq --indent 0 del (.port_table[]?.mac_table) returned status 5; jq: pars
Using Zabbix 7.0.8 and I have jq and expect installed. I also cleared (deleted) the old templates and imported brand new based on the master branch.
Config map that I imported directly from the file:
The text was updated successfully, but these errors were encountered: