patricegautier / unifiZabbix

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

Can't connect to USG without password. #30

Closed M0okz closed 2 years ago

M0okz commented 2 years ago

Bonjour ! Je suis impatient d'utiliser votre travail, Cependant, j'ai un soucis avec le sshpass ou il n'est pas pris en compte. Idem for my USG-XG-8 Capture d’écran 2022-03-07 091729

M0okz commented 2 years ago

Bonjour ! Je suis impatient d'utiliser votre travail, Cependant, j'ai un soucis avec le sshpass ou il n'est pas pris en compte. Idem for my USG-XG-8 Capture d’écran 2022-03-07 091729 Capture d’écran 2022-03-07 091729

M0okz commented 2 years ago

J'ai résolu le PB initial, avec l'installation de SSHPASS :)

M0okz commented 2 years ago

image Par contre ça ne remonte aucune données actuellement. Si vous auriez une idée Merci d'avance

M0okz commented 2 years ago

J'ai essayé de lancer avec la commande : sudo -u zabbix /usr/lib/zabbix/externalscripts/mca-dump-short.sh -d 172.16.20.250 -u admin -p /var/lib/zabbix/ssh_keys/pws_admin -t USG Et exporter le json, il à l'air tout à fait valide.

patricegautier commented 2 years ago

Peux-tu essayer de rajouter en deuxième ligne de /usr/lib/zabbix/externalscripts/mca-dump-short.sh

set -xv

et de relancer la commande ci-dessus et de voir se cela donne un indice?

M0okz commented 2 years ago

Oui voici la sortie après avoir dé-commenter la ligne "set-xv" : image

M0okz commented 2 years ago

Et dans les logs : image

M0okz commented 2 years ago

Je sais pas si c'est normal, mais les options se retrouvent vides. Il faut les configurer à la main ?

Francimour commented 2 years ago

Hi there,

I have same issue with

sudo -u zabbix /usr/lib/zabbix/externalscripts/mca-dump-short.sh -d 10.1.2.114 -u admin -t SWITCH

ssh: Could not resolve hostname admin: Name or service not known
{ "mcaDumpError": "ssh returned an error"  }
sudo -u zabbix /usr/lib/zabbix/externalscripts/mca-dump-short.sh -d 10.1.2.114 -u admin -i /home/zabbix/.ssh/zb_id_rsa -t SWITCH
set -uo pipefail
+ set -uo pipefail
#set -e

function usage() {

        local error="${1:-}"
        if [[ -n "${error}" ]]; then
                echo "${error}"
                echo
        fi

        cat <<- EOF
        Usage ${0}  -i privateKeyPath -p <passwordFilePath> -u user -v -d targetDevice [-t AP|SWITCH|SWITCH_FEATURE_DISCOVERY|UDMP|USG|CK]
          -i specify private public key pair path
          -p specify password file path to be passed to sshpass -f. Note if both -i and -p are provided, the password file will be used
          -u SSH user name for Unifi device
          -d IP or FQDN for Unifi device
          -t Unifi device type
          -v verbose and non compressed output
        EOF
        exit 2
}

SSHPASS_OPTIONS=
+ SSHPASS_OPTIONS=
PRIVKEY_OPTION=
+ PRIVKEY_OPTION=
PASSWORD_FILE_PATH=
+ PASSWORD_FILE_PATH=
VERBOSE_OPTION=
+ VERBOSE_OPTION=

while getopts 'i:u:t:hd:vp:' OPT
do
  case $OPT in
    i) PRIVKEY_OPTION="-i "${OPTARG} ;;
    u) USER=${OPTARG} ;;
    t) DEVICE_TYPE=${OPTARG} ;;
    d) TARGET_DEVICE=${OPTARG} ;;
    v) VERBOSE=true ;;
    p) PASSWORD_FILE_PATH=${OPTARG} ;;
    h) usage ;;
  esac
done
+ getopts i:u:t:hd:vp: OPT
+ case $OPT in
+ TARGET_DEVICE=10.1.2.114
+ getopts i:u:t:hd:vp: OPT
+ case $OPT in
+ USER=admin
+ getopts i:u:t:hd:vp: OPT
+ case $OPT in
+ PRIVKEY_OPTION='-i /home/zabbix/.ssh/zb_id_rsa'
+ getopts i:u:t:hd:vp: OPT
+ case $OPT in
+ DEVICE_TYPE=SWITCH
+ getopts i:u:t:hd:vp: OPT

if [[ -n ${VERBOSE:-} ]]; then
        VERBOSE_OPTION="-v"
fi
+ [[ -n '' ]]

if [[ -z "${TARGET_DEVICE:-}" ]]; then
        usage "Please specify a target device with -d"
fi
+ [[ -z 10.1.2.114 ]]

if [[ -z "${USER:-}" ]]; then
        echo "Please specify a username with -u" >&2
        usage
fi
+ [[ -z admin ]]

# {$UNIFI_SSHPASS_PASSWORD_PATH} means the macro didn't resolve in Zabbix
if [[ -n ${PASSWORD_FILE_PATH} ]] && ! [[ ${PASSWORD_FILE_PATH} == "{\$UNIFI_SSHPASS_PASSWORD_PATH}" ]]; then 
        SSHPASS_OPTIONS="-f "${PASSWORD_FILE_PATH}" "${VERBOSE_OPTION}
        PRIVKEY_OPTION=
fi
+ [[ -n '' ]]

if [[ ${DEVICE_TYPE:-} == 'AP' ]]; then
        JQ_OPTIONS='del (.port_table) | del(.radio_table[].scan_table) | del (.vap_table[].sta_table)'
elif [[ ${DEVICE_TYPE:-} == 'SWITCH' ]]; then
        JQ_OPTIONS='del (.port_table[].mac_table)'
elif [[ ${DEVICE_TYPE:-} == 'SWITCH_FEATURE_DISCOVERY' ]]; then
        JQ_OPTIONS="[ { power:  .port_table |  any (  .poe_power >= 0 ) ,\
        total_power_consumed_key_name: \"total_power_consumed\",\
        max_power_key_name: \"max_power\",\
        max_power: .total_max_power,\
        percent_power_consumed_key_name: \"percent_power_consumed\",\
        has_eth1: .has_eth1,\
        has_temperature: .has_temperature,\
        temperature_key_name: \"temperature\",\
        overheating_key_name: \"overheating\",\
        has_fan: .has_fan,\
        fan_level_key_name: \"fan_level\"
        } ]"
elif [[ ${DEVICE_TYPE:-} == 'UDMP' ]]; then
        JQ_OPTIONS='del (.dpi_stats) | del(.fingerprints)'
elif [[ ${DEVICE_TYPE:-} == 'USG' ]]; then
        JQ_OPTIONS='del (.dpi_stats) | del(.fingerprints)'
elif [[ ${DEVICE_TYPE:-} == 'CK' ]]; then
        JQ_OPTIONS= 
elif [[ -n "${DEVICE_TYPE:-}" ]]; then
        echo "Unknown device Type: "${DEVICE_TYPE:-}
        usage
fi
+ [[ SWITCH == \A\P ]]
+ [[ SWITCH == \S\W\I\T\C\H ]]
+ JQ_OPTIONS='del (.port_table[].mac_table)'

INDENT_OPTION="--indent 0"
+ INDENT_OPTION='--indent 0'

if [[ -n "${VERBOSE:-}" ]]; then
        INDENT_OPTION=
    echo  'ssh -o LogLevel=Error -o StrictHostKeyChecking=accept-new '${PRIVKEY_OPTION} ${USER}@${TARGET_DEVICE}' "mca-dump" | jq '${INDENT_OPTION} ${JQ_OPTIONS:-}
fi
+ [[ -n '' ]]

declare OUTPUT
+ declare OUTPUT
if [[ -n "${SSHPASS_OPTIONS:-}" ]]; then
        OUTPUT=$(sshpass ${SSHPASS_OPTIONS} ssh -o LogLevel=Error -o StrictHostKeyChecking=accept-new ${PRIVKEY_OPTION} ${USER}@${TARGET_DEVICE} mca-dump)
else
        OUTPUT=$(ssh -o LogLevel=Error -o StrictHostKeyChecking=accept-new ${PRIVKEY_OPTION} ${USER} @${TARGET_DEVICE} mca-dump)
fi
+ [[ -n '' ]]
++ ssh -o LogLevel=Error -o StrictHostKeyChecking=accept-new -i /home/zabbix/.ssh/zb_id_rsa admin @10.1.2.114 mca-dump
ssh: Could not resolve hostname admin: Name or service not known
+ OUTPUT=

if (( $? != 0 )); then
        OUTPUT='{ "mcaDumpError": "ssh returned an error"  }'
else
        OUTPUT=$(echo -n "${OUTPUT}" | jq ${INDENT_OPTION} "${JQ_OPTIONS:-}")
        if (( $? != 0 )); then
                OUTPUT='{ "mcaDumpError": "gunzip | jq returned an error"  }'
        fi
fi
+ ((  255 != 0  ))
+ OUTPUT='{ "mcaDumpError": "ssh returned an error"  }'

echo "$OUTPUT"
+ echo '{ "mcaDumpError": "ssh returned an error"  }'
{ "mcaDumpError": "ssh returned an error"  }

Screenshot 2022-03-10 at 15 31 59

Normal SSH works without password.

Thank you.

patricegautier commented 2 years ago

Ah sorry my fault, a bad commit last night.

Try to pull the latest it fixes that problem:

ssh: Could not resolve hostname admin: Name or service not known { "mcaDumpError": "ssh returned an error" }

M0okz commented 2 years ago

Pas d'évolution pour moi, j'ai mis à jour le template pour autant : image

mtheofy commented 2 years ago

Having the same issue

root:~# sudo -u zabbix /usr/lib/zabbix/externalscripts/mca-dump-short.sh -d 192.168.1.250 -u admin -t AP ssh: Could not resolve hostname admin: Name or service not known { "mcaDumpError": "ssh returned an error" } Using the latest version (14/3/2022)

thank you

patricegautier commented 2 years ago

@mtheofy , @M0okz - sorry guys, an extra space typo had found its way into the commit. The problem that @mtheofy ran into at least should be fixed after updating.

mtheofy commented 2 years ago

Thanks @patricegautier . Checked the new version and it's indeed fixed.

M0okz commented 2 years ago

Hello @patricegautier I tried the new version anyway, and still the problem of permissions, related here : `root@lxs-zabbix:~# tail -f /var/log/zabbix/zabbix_server.log 13015:20220315:204940.299 server #37 started [icmp pinger #1] 13013:20220315:204940.300 server #35 started [trapper #4] 13019:20220315:204940.300 server #41 started [history poller #3] 13020:20220315:204940.300 server #42 started [history poller #4] 13021:20220315:204940.301 server #43 started [history poller #5] 13017:20220315:204940.302 server #39 started [history poller #1] 13014:20220315:204940.302 server #36 started [trapper #5] 13022:20220315:204940.304 server #44 started [availability manager #1] 13023:20220315:204940.305 server #45 started [trigger housekeeper #1] 13026:20220315:204940.306 server #46 started [odbc poller #1] 13012:20220315:205058.636 cannot send list of active checks to "172.16.70.20": host [WIN-DC-2019] not found 12996:20220315:205100.893 item "SW4:load_avg_15mn" became not supported: Preprocessing failed for: Permission denied, please try again.

  1. Failed: cannot perform regular expression ".load average: [^ ], [^ ]*, ([0-9]+([.][0-9]+))" match for value of type "string": pattern does not match 12996:20220315:205100.893 item "SW4:load_avg_5mn" became not supported: Preprocessing failed for: Permission denied, please try again.
  2. Failed: cannot perform regular expression ".load average: [^ ], ([0-9]+([.][0-9]+))" match for value of type "string": pattern does not match 12996:20220315:205100.893 item "SW4:load_avg_1mn" became not supported: Preprocessing failed for: Permission denied, please try again.
  3. Failed: cannot perform regular expression ".*load average: ([0-9]+([.][0-9]+))" match for value of type "string": pattern does not match 12996:20220315:205100.893 item "SW4:cpu_smooth" became not supported: Cannot evaluate function: not enough data at "avg(//cpu,{$UNIFI_SMOOTHING_PERIOD})". 12990:20220315:205102.272 discovery rule "SW4:poe_discovery_by_port" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" }
  4. Failed: cannot extract value from json by path "$.port_table[?(@.poe_power>=0)]": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12990:20220315:205102.276 discovery rule "SW4:switch_port_discovery" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" }
  5. Failed: cannot extract value from json by path "$.port_table": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:cpu" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" }
  6. Failed: cannot extract value from json by path "$.['system-stats'].cpu": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:mem_total" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" }
  7. Failed: cannot extract value from json by path "$.sys_stats.mem_total": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:total_tx_bandwidth" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" }
  8. Failed: cannot extract value from json by path "$.port_table[*].tx_bytes.sum()": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:uptime" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" }
  9. Failed: cannot extract value from json by path "$.uptime": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:mem_used" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" }
  10. Failed: cannot extract value from json by path "$.sys_stats.mem_used": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:hostname" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" }
  11. Failed: cannot extract value from json by path "$.hostname": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:total_rx_bandwidth" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" }
  12. Failed: cannot extract value from json by path "$.port_table[*].rx_bytes.sum()": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:model" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" }
  13. Failed: cannot extract value from json by path "$.model_display": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12996:20220315:205103.960 item "SW4:memory" became not supported: Cannot evaluate function: item "/SW4/mem_used" is not supported at "last(//mem_used) / last(//mem_total)". `
patricegautier commented 2 years ago

Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" }

So that’s the underlying problem. If you invoke mca-dump-short.sh directly with the same arguments as one of these items, what do you get?

-P

Sent from my iPad

On Mar 15, 2022, at 12:55 PM, MOok_972 @.***> wrote:

 Hello @patricegautier I tried the new version anyway, and still the problem of permissions, related here : @.***:~# tail -f /var/log/zabbix/zabbix_server.log 13015:20220315:204940.299 server #37 started [icmp pinger #1] 13013:20220315:204940.300 server #35 started [trapper #4] 13019:20220315:204940.300 server #41 started [history poller #3] 13020:20220315:204940.300 server #42 started [history poller #4] 13021:20220315:204940.301 server #43 started [history poller #5] 13017:20220315:204940.302 server #39 started [history poller #1] 13014:20220315:204940.302 server #36 started [trapper #5] 13022:20220315:204940.304 server #44 started [availability manager #1] 13023:20220315:204940.305 server #45 started [trigger housekeeper #1] 13026:20220315:204940.306 server #46 started [odbc poller #1] 13012:20220315:205058.636 cannot send list of active checks to "172.16.70.20": host [WIN-DC-2019] not found 12996:20220315:205100.893 item "SW4:load_avg_15mn" became not supported: Preprocessing failed for: Permission denied, please try again.

Failed: cannot perform regular expression ".load average: [^ ], [^ ], ([0-9]+([.][0-9]+))" match for value of type "string": pattern does not match 12996:20220315:205100.893 item "SW4:load_avg_5mn" became not supported: Preprocessing failed for: Permission denied, please try again. Failed: cannot perform regular expression ".load average: [^ ], ([0-9]+([.][0-9]+))" match for value of type "string": pattern does not match 12996:20220315:205100.893 item "SW4:load_avg_1mn" became not supported: Preprocessing failed for: Permission denied, please try again. Failed: cannot perform regular expression ".load average: ([0-9]+([.][0-9]+))" match for value of type "string": pattern does not match 12996:20220315:205100.893 item "SW4:cpu_smooth" became not supported: Cannot evaluate function: not enough data at "avg(//cpu,{$UNIFI_SMOOTHING_PERIOD})". 12990:20220315:205102.272 discovery rule "SW4:poe_discovery_by_port" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" } Failed: cannot extract value from json by path @.**_power>=0)]": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12990:20220315:205102.276 discovery rule "SW4:switch_port_discovery" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" } Failed: cannot extract value from json by path "$.port_table": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:cpu" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" } Failed: cannot extract value from json by path "$.['system-stats'].cpu": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:mem_total" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" } Failed: cannot extract value from json by path "$.sys_stats.mem_total": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:total_tx_bandwidth" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" } Failed: cannot extract value from json by path "$.port_table[].tx_bytes.sum()": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:uptime" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" } Failed: cannot extract value from json by path "$.uptime": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:mem_used" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" } Failed: cannot extract value from json by path "$.sys_stats.mem_used": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:hostname" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" } Failed: cannot extract value from json by path "$.hostname": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:total_rx_bandwidth" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" } Failed: cannot extract value from json by path "$.port_table[*].rx_bytes.sum()": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12998:20220315:205102.331 item "SW4:model" became not supported: Preprocessing failed for: Permission denied, please try again...{ "mcaDumpError": "ssh returned an error" } Failed: cannot extract value from json by path "$.model_display": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Permission denied, please try again. { "mcaDumpError": "ssh returned an error" }' 12996:20220315:205103.960 item "SW4:memory" became not supported: Cannot evaluate function: item "/SW4/mem_used" is not supported at "last(//mem_used) / last(//mem_total)". ` — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

M0okz commented 2 years ago

I always get this error with "-p" option : image

patricegautier commented 2 years ago

Hi,

A few things to check:

• the -p flag wants the path to your password file, not sure what the load average string you have there is supposed to do • if you specify -p, then sshpass must be installed on that machine and in your $PATH • and finally just double checking that you are running this test from the Zabbix server right?

-P

On Mar 17, 2022, at 6:29 AM, MOok_972 @.***> wrote:

I always get this error with "-p" option : https://user-images.githubusercontent.com/87419947/158818713-29cbd40e-293d-46ed-82e2-4c0260fa2f34.png — Reply to this email directly, view it on GitHub https://github.com/patricegautier/unifiZabbix/issues/30#issuecomment-1070926909, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFHTJZVA5GTUBXYO75SLWDVAMXSJANCNFSM5QDSYSNQ. You are receiving this because you were mentioned.

Francimour commented 2 years ago

Hi,

so I have these error after last update:

Zabbix Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 109: sshpass: command not found.{ "mcaDum... Failed: cannot extract value from json by path "$.['system-stats'].cpu": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 109: sshpass: command not found { "mcaDumpError": "ssh returned an error" }'

Preprocessing failed for: /usr/lib/zabbix/externalscripts/ssh-run.sh: line 55: sshpass: command not found Failed: cannot perform regular expression ".*load average: [^ ]*, ([0-9]+([.][0-9]+))" match for value of type "string": pattern does not match

etc.

Cannot evaluate function: item "/Unifi Switch HQ C2/mem_used" is not supported at "last(//mem_used) / last(//mem_total)".

In zabbix terminal:

sudo -u zabbix /usr/lib/zabbix/externalscripts/mca-dump-short.sh -d 10.1.2.114 -u admin -i /home/zabbix/.ssh/zb_id_rsa -t SWITCH {"anon_id":"8f2d22b6-a442-4770-8b5f-00662ff14119","architecture":"mips","board_rev":15,"bootid":0,"bootrom_version":"usw-US_v1.0.23.75-g569a5941","cfgversion":"519e23fe714e81d5","connect_request_ip":"10.1.2.114","connect_request_port":"48114","default":false,"dhcp_server_table":[],"discovery_response":false,"dualboot":true,"ever_crash":false,"fw_caps":2806709797,"gateway_ip":"10.1.2.1","gateway_mac":"70:4c:a5:7d:39:6e","guest_kicks":0,"guest_token":"101E9EBD4831B91B54C24F5426B3A411","has_eth1":false,"has_fan":false,"has_speaker":false,"has_temperature":false,"hash_id":"0b5f00662ff14119","hostname":"HQC2","hw_caps":8,"if_table":[{"ip":"10.1.2.114","mac":"24:5a:4c:59:32:b6","name":"eth0","netmask":"255.255.254.0","num_port":52,"rx_bytes":704912367,"rx_dropped":66628,"rx_errors":0,"rx_multicast":0,"rx_packets":10947373,"tx_bytes":0,"tx_dropped":0,"tx_errors":0,"tx_packets":282212}],"inform_min_interval":30,"inform_url":"http://10.1.3.134:8080/inform","internet":true,"ip":"10.1.2.114","isolated":false,"kernel_version":"3.18.24","last_error_conns":[{"error_reason":6,"last_error_str":"Not Adopted (http://10.1.3.134:8080/inform)","last_managed_e_time":438481,"last_managed_s_time":438795,"timestamp":"Wed Mar 16 15:53:47 2022"},{"error_reason":7,"last_error_str":"Server Busy (http://10.1.3.134:8080/inform)","last_managed_e_time":438481,"last_managed_s_time":438795,"timestamp":"Wed Mar 16 15:56:34 2022"},{"error_reason":3,"last_error_str":"Unreachable (http://10.1.3.134:8080/inform)","last_managed_e_time":438481,"last_managed_s_time":438795,"timestamp":"Thu Mar 17 08:53:12 2022"},{"error_reason":4,"last_error_str":"Timeout (http://10.1.3.134:8080/inform)","last_managed_e_time":438481,"last_managed_s_time":438795,"timestamp":"Thu Mar 17 08:54:22 2022"},{"error_reason":4,"last_error_str":"Timeout (http://10.1.3.134:8080/inform)","last_managed_e_time":601810,"last_managed_s_time":438795,"timestamp":"Thu Mar 17 08:55:12 2022"},{"error_reason":4,"last_error_str":"Timeout (http://10.1.3.134:8080/inform)","last_managed_e_time":601810,"last_managed_s_time":601849,"timestamp":"Thu Mar 17 16:11:45 2022"},{"error_reason":3,"last_error_str":"Unreachable (http://10.1.3.134:8080/inform)","last_managed_e_time":601810,"last_managed_s_time":601849,"timestamp":"Thu Mar 17 16:12:26 2022"},{"error_reason":6,"last_error_str":"Not Adopted (http://10.1.3.134:8080/inform)","last_managed_e_time":628107,"last_managed_s_time":601849,"timestamp":"Thu Mar 17 16:12:57 2022"},{"error_reason":1,"last_error_str":"Unable to resolve (http://HQ-Cloud-Key:8080/inform)","last_managed_e_time":628107,"last_managed_s_time":601849,"timestamp":"Thu Mar 17 16:12:58 2022"},{"error_reason":7,"last_error_str":"Server Busy (http://10.1.3.134:8080/inform)","last_managed_e_time":628107,"last_managed_s_time":628142,"timestamp":"Thu Mar 17 16:16:17 2022"}],"lldp_table":[{"chassis_id":"78:45:58:D5:EF:37","is_wired":true,"local_port_idx":1,"local_port_name":"Port 1","port_id":"78:45:58:D5:EF:37"},{"chassis_id":"78:45:58:D4:2C:D5","is_wired":true,"local_port_idx":2,"local_port_name":"Port 2","port_id":"78:45:58:D4:2C:D5"},{"chassis_id":"78:45:58:C3:90:46","is_wired":true,"local_port_idx":4,"local_port_name":"HQ C.1","port_id":"78:45:58:C3:90:46"},{"chassis_id":"78:45:58:D4:43:CD","is_wired":true,"local_port_idx":6,"local_port_name":"Port 6","port_id":"78:45:58:D4:43:CD"},{"chassis_id":"AC:CC:8E:9F:0C:73","is_wired":true,"local_port_idx":7,"local_port_name":"Vchod","port_id":"AC:CC:8E:9F:0C:73"},{"chassis_id":"AC:CC:8E:BE:61:CD","is_wired":true,"local_port_idx":9,"local_port_name":"Full","port_id":"AC:CC:8E:BE:61:CD"},{"chassis_id":"AC:CC:8E:9F:11:7A","is_wired":true,"local_port_idx":10,"local_port_name":"Rack","port_id":"AC:CC:8E:9F:11:7A"},{"chassis_id":"00:2B:67:81:AF:E5","is_wired":true,"local_port_idx":22,"local_port_name":"Port 22","port_id":"00:2B:67:81:AF:E5"},{"chassis_id":"78:45:58:C5:71:92","is_wired":true,"local_port_idx":51,"local_port_name":"SFP 3","port_id":"0/52"},{"chassis_id":"68:D7:9A:4A:2E:F3","is_wired":true,"local_port_idx":52,"local_port_name":"SFP 4","port_id":"Port 25"}],"locating":false,"mac":"24:5a:4c:59:32:b6","manufacturer_id":4,"model":"USL48P","model_display":"USW-48-PoE","netmask":"255.255.254.0","overheating":false,"port_table":[{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Class 4","poe_current":"172.00","poe_enable":true,"poe_good":true,"poe_mode":"auto","poe_power":"9.20","poe_voltage":"53.49","port_idx":1,"port_poe":true,"rx_broadcast":107467,"rx_bytes":3464038274,"rx_dropped":0,"rx_errors":0,"rx_multicast":498375,"rx_packets":8915501,"satisfaction":100,"satisfaction_reason":0,"speed":1000,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"forwarding","tx_broadcast":23749880,"tx_bytes":50675026241,"tx_dropped":0,"tx_errors":0,"tx_multicast":106820026,"tx_packets":157175292,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Class 4","poe_current":"207.00","poe_enable":true,"poe_good":true,"poe_mode":"auto","poe_power":"11.09","poe_voltage":"53.56","port_idx":2,"port_poe":true,"rx_broadcast":258832,"rx_bytes":5192287772,"rx_dropped":0,"rx_errors":0,"rx_multicast":585122,"rx_packets":13792209,"satisfaction":100,"satisfaction_reason":0,"speed":1000,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"forwarding","tx_broadcast":12846613,"tx_bytes":72750863211,"tx_dropped":0,"tx_errors":0,"tx_multicast":44992937,"tx_packets":104698465,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":3,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Class 4","poe_current":"152.00","poe_enable":true,"poe_good":true,"poe_mode":"auto","poe_power":"8.14","poe_voltage":"53.56","port_idx":4,"port_poe":true,"rx_broadcast":148809,"rx_bytes":2485593994,"rx_dropped":0,"rx_errors":0,"rx_multicast":552718,"rx_packets":6346916,"satisfaction":100,"satisfaction_reason":0,"speed":1000,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"forwarding","tx_broadcast":38474241,"tx_bytes":59166783166,"tx_dropped":0,"tx_errors":0,"tx_multicast":163317377,"tx_packets":225137955,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":5,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Class 4","poe_current":"168.00","poe_enable":true,"poe_good":true,"poe_mode":"auto","poe_power":"9.01","poe_voltage":"53.62","port_idx":6,"port_poe":true,"rx_broadcast":80951,"rx_bytes":2410469768,"rx_dropped":0,"rx_errors":0,"rx_multicast":491876,"rx_packets":3989230,"satisfaction":100,"satisfaction_reason":0,"speed":1000,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"forwarding","tx_broadcast":13344846,"tx_bytes":26262078603,"tx_dropped":0,"tx_errors":0,"tx_multicast":46494645,"tx_packets":68889444,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Class 1","poe_current":"30.00","poe_enable":true,"poe_good":true,"poe_mode":"auto","poe_power":"1.60","poe_voltage":"53.49","port_idx":7,"port_poe":true,"rx_broadcast":433,"rx_bytes":33817720701,"rx_dropped":0,"rx_errors":0,"rx_multicast":22966,"rx_packets":30743500,"satisfaction":100,"satisfaction_reason":0,"speed":100,"speed_caps":1048623,"stp_pathcost":200000,"stp_state":"forwarding","tx_broadcast":13106323,"tx_bytes":22838280189,"tx_dropped":0,"tx_errors":0,"tx_multicast":45560378,"tx_packets":80384719,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Class 2","poe_current":"48.00","poe_enable":true,"poe_good":true,"poe_mode":"auto","poe_power":"2.57","poe_voltage":"53.49","port_idx":8,"port_poe":true,"rx_broadcast":802,"rx_bytes":14275375,"rx_dropped":0,"rx_errors":0,"rx_multicast":6309,"rx_packets":36715,"satisfaction":100,"satisfaction_reason":0,"speed":100,"speed_caps":1048623,"stp_pathcost":200000,"stp_state":"forwarding","tx_broadcast":13104166,"tx_bytes":21440865053,"tx_dropped":0,"tx_errors":0,"tx_multicast":45548801,"tx_packets":61030184,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Class 1","poe_current":"35.00","poe_enable":true,"poe_good":true,"poe_mode":"auto","poe_power":"1.87","poe_voltage":"53.49","port_idx":9,"port_poe":true,"rx_broadcast":443,"rx_bytes":56122952435,"rx_dropped":0,"rx_errors":0,"rx_multicast":20865,"rx_packets":43301067,"satisfaction":100,"satisfaction_reason":0,"speed":100,"speed_caps":1048623,"stp_pathcost":200000,"stp_state":"forwarding","tx_broadcast":13105652,"tx_bytes":23192236823,"tx_dropped":0,"tx_errors":0,"tx_multicast":45558471,"tx_packets":85428213,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Class 1","poe_current":"36.00","poe_enable":true,"poe_good":true,"poe_mode":"auto","poe_power":"1.93","poe_voltage":"53.69","port_idx":10,"port_poe":true,"rx_broadcast":449,"rx_bytes":24596293986,"rx_dropped":0,"rx_errors":0,"rx_multicast":20936,"rx_packets":24299558,"satisfaction":100,"satisfaction_reason":0,"speed":100,"speed_caps":1048623,"stp_pathcost":200000,"stp_state":"forwarding","tx_broadcast":13105746,"tx_bytes":22710715344,"tx_dropped":0,"tx_errors":0,"tx_multicast":45559826,"tx_packets":78535876,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":11,"port_poe":true,"rx_broadcast":3014,"rx_bytes":794828151,"rx_dropped":0,"rx_errors":0,"rx_multicast":20206,"rx_packets":3653766,"satisfaction":100,"satisfaction_reason":0,"speed":0,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"disabled","tx_broadcast":4998258,"tx_bytes":21263465894,"tx_dropped":4,"tx_errors":0,"tx_multicast":31156678,"tx_packets":43460463,"up":false},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":12,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":13,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":14,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":15,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":16,"port_poe":true,"rx_broadcast":24951563,"rx_bytes":32001518188,"rx_dropped":0,"rx_errors":0,"rx_multicast":88029196,"rx_packets":156869434,"satisfaction":100,"satisfaction_reason":0,"speed":0,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"disabled","tx_broadcast":22199709,"tx_bytes":32303921228,"tx_dropped":0,"tx_errors":0,"tx_multicast":84918836,"tx_packets":164422515,"up":false},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":17,"port_poe":true,"rx_broadcast":22199613,"rx_bytes":32303836874,"rx_dropped":0,"rx_errors":0,"rx_multicast":84918624,"rx_packets":164422167,"satisfaction":100,"satisfaction_reason":0,"speed":0,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"disabled","tx_broadcast":24951563,"tx_bytes":32001528556,"tx_dropped":0,"tx_errors":0,"tx_multicast":88029197,"tx_packets":156869596,"up":false},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":18,"port_poe":true,"rx_broadcast":1186,"rx_bytes":2617647229,"rx_dropped":0,"rx_errors":0,"rx_multicast":7890,"rx_packets":4460310,"satisfaction":100,"satisfaction_reason":0,"speed":1000,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"forwarding","tx_broadcast":3228709,"tx_bytes":11271403247,"tx_dropped":0,"tx_errors":0,"tx_multicast":19044494,"tx_packets":27251042,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":19,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":20,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":21,"port_poe":true,"rx_broadcast":5305,"rx_bytes":1949354325,"rx_dropped":0,"rx_errors":0,"rx_multicast":32414,"rx_packets":8324890,"satisfaction":100,"satisfaction_reason":0,"speed":0,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"disabled","tx_broadcast":36184621,"tx_bytes":75036658373,"tx_dropped":0,"tx_errors":0,"tx_multicast":152777437,"tx_packets":224107890,"up":false},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":22,"port_poe":true,"rx_broadcast":65151,"rx_bytes":644529364,"rx_dropped":0,"rx_errors":0,"rx_multicast":43989,"rx_packets":2461026,"satisfaction":100,"satisfaction_reason":0,"speed":1000,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"forwarding","tx_broadcast":13095476,"tx_bytes":23845061193,"tx_dropped":6,"tx_errors":0,"tx_multicast":75832871,"tx_packets":100663870,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":23,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":24,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":25,"port_poe":true,"rx_broadcast":18028,"rx_bytes":618011995,"rx_dropped":0,"rx_errors":0,"rx_multicast":77608,"rx_packets":1612304,"satisfaction":100,"satisfaction_reason":0,"speed":0,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"disabled","tx_broadcast":15408946,"tx_bytes":30479764359,"tx_dropped":0,"tx_errors":0,"tx_multicast":89893859,"tx_packets":116935288,"up":false},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":26,"port_poe":true,"rx_broadcast":37904,"rx_bytes":3776433942,"rx_dropped":0,"rx_errors":0,"rx_multicast":264452,"rx_packets":11647293,"satisfaction":100,"satisfaction_reason":0,"speed":1000,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"forwarding","tx_broadcast":17599477,"tx_bytes":38052139863,"tx_dropped":36,"tx_errors":0,"tx_multicast":101156446,"tx_packets":141523160,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":27,"port_poe":true,"rx_broadcast":918,"rx_bytes":909976,"rx_dropped":0,"rx_errors":0,"rx_multicast":6322,"rx_packets":9584,"satisfaction":100,"satisfaction_reason":0,"speed":100,"speed_caps":1048623,"stp_pathcost":200000,"stp_state":"forwarding","tx_broadcast":16307286,"tx_bytes":25830108423,"tx_dropped":0,"tx_errors":0,"tx_multicast":66966630,"tx_packets":86280444,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":28,"port_poe":true,"rx_broadcast":995,"rx_bytes":1745047,"rx_dropped":0,"rx_errors":0,"rx_multicast":1033,"rx_packets":8940,"satisfaction":100,"satisfaction_reason":0,"speed":100,"speed_caps":1048623,"stp_pathcost":200000,"stp_state":"forwarding","tx_broadcast":30845398,"tx_bytes":34945069560,"tx_dropped":193,"tx_errors":0,"tx_multicast":98865822,"tx_packets":133792668,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":29,"port_poe":true,"rx_broadcast":4351,"rx_bytes":1592929701,"rx_dropped":0,"rx_errors":0,"rx_multicast":166212,"rx_packets":3737327,"satisfaction":100,"satisfaction_reason":0,"speed":1000,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"forwarding","tx_broadcast":4605222,"tx_bytes":17445969110,"tx_dropped":0,"tx_errors":0,"tx_multicast":28427084,"tx_packets":38921057,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":30,"port_poe":true,"rx_broadcast":7425,"rx_bytes":4492893213,"rx_dropped":0,"rx_errors":0,"rx_multicast":13201,"rx_packets":48027585,"satisfaction":100,"satisfaction_reason":0,"speed":100,"speed_caps":1048623,"stp_pathcost":200000,"stp_state":"forwarding","tx_broadcast":7884616,"tx_bytes":27126163732,"tx_dropped":0,"tx_errors":0,"tx_multicast":52312384,"tx_packets":113505294,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":31,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":3,"poe_class":"Unknown","poe_current":"0.00","poe_enable":false,"poe_good":false,"poe_mode":"auto","poe_power":"0.00","poe_voltage":"0.00","port_idx":32,"port_poe":true,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":33,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":34,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":35,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":36,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":37,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":38,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":39,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":40,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":41,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":42,"port_poe":false,"rx_broadcast":7541,"rx_bytes":18765009,"rx_dropped":0,"rx_errors":0,"rx_multicast":9729,"rx_packets":60454,"satisfaction":100,"satisfaction_reason":0,"speed":0,"speed_caps":1048623,"stp_pathcost":20000,"stp_state":"disabled","tx_broadcast":14388573,"tx_bytes":9920521101,"tx_dropped":208,"tx_errors":0,"tx_multicast":32634822,"tx_packets":48483130,"up":false},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":43,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":44,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":45,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":46,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":47,"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":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"GE","poe_caps":0,"port_idx":48,"port_poe":false,"rx_broadcast":44088,"rx_bytes":620614324,"rx_dropped":0,"rx_errors":0,"rx_multicast":264224,"rx_packets":2790817,"satisfaction":100,"satisfaction_reason":0,"speed":100,"speed_caps":1048623,"stp_pathcost":200000,"stp_state":"forwarding","tx_broadcast":16274722,"tx_bytes":26278867973,"tx_dropped":0,"tx_errors":0,"tx_multicast":66774665,"tx_packets":90215425,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"SFP","poe_caps":0,"port_idx":49,"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,"sfp_found":false,"speed":0,"speed_caps":1048608,"stp_pathcost":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":true,"media":"SFP","poe_caps":0,"port_idx":50,"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,"sfp_found":false,"speed":0,"speed_caps":1048608,"stp_pathcost":20000,"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":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":true,"jumbo":true,"media":"SFP","poe_caps":0,"port_idx":51,"port_poe":false,"rx_broadcast":12888834,"rx_bytes":171607286323,"rx_dropped":0,"rx_errors":0,"rx_multicast":45765373,"rx_packets":324444110,"satisfaction":100,"satisfaction_reason":0,"sfp_compliance":"Unknown","sfp_current":"0.000","sfp_found":true,"sfp_part":"UC-DAC-SFP+","sfp_rev":"A1","sfp_rxfault":false,"sfp_rxpower":"0.00","sfp_serial":"H 21038017586","sfp_temperature":"0.000","sfp_txfault":false,"sfp_txpower":"0.00","sfp_vendor":"Ubiquiti Inc.","sfp_voltage":"0.000","speed":1000,"speed_caps":1048608,"stp_pathcost":20000,"stp_state":"forwarding","tx_broadcast":31551372,"tx_bytes":174513167205,"tx_dropped":0,"tx_errors":0,"tx_multicast":122997759,"tx_packets":378086426,"up":true},{"autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowctrl_rx":false,"flowctrl_tx":false,"full_duplex":true,"is_uplink":false,"jumbo":true,"media":"SFP","poe_caps":0,"port_idx":52,"port_poe":false,"rx_broadcast":8586,"rx_bytes":73599132,"rx_dropped":0,"rx_errors":0,"rx_multicast":28584,"rx_packets":390366,"satisfaction":100,"satisfaction_reason":0,"sfp_compliance":"Unknown","sfp_current":"0.000","sfp_found":true,"sfp_part":"UC-DAC-SFP+","sfp_rev":"A1","sfp_rxfault":false,"sfp_rxpower":"0.00","sfp_serial":"H 21038017580","sfp_temperature":"0.000","sfp_txfault":false,"sfp_txpower":"0.00","sfp_vendor":"Ubiquiti Inc.","sfp_voltage":"0.000","speed":1000,"speed_caps":1048608,"stp_pathcost":20000,"stp_state":"forwarding","tx_broadcast":44408538,"tx_bytes":52602258712,"tx_dropped":0,"tx_errors":0,"tx_multicast":168560326,"tx_packets":225843992,"up":true}],"required_version":"4.0.60","root_switch":"24:5a:4c:17:a5:f8","satisfaction":100,"satisfaction_reason":0,"selfrun_beacon":true,"serial":"245A4C5932B6","service_mac":"24:5a:4c:59:32:b7","ssh_session_table":[],"state":2,"stats_inform_interval":1,"stp_priority":32768,"stream_token":"","switch_caps":{"feature_caps":33790,"max_aggregate_sessions":8,"max_l3_intf":0,"max_mirror_sessions":1,"max_reserved_routes":0,"max_static_routes":0},"sys_error_caps":0,"sys_stats":{"loadavg_1":"0.72","loadavg_15":"0.85","loadavg_5":"0.78","mem_buffer":0,"mem_total":129736704,"mem_used":46891008},"system-stats":{"cpu":"18.8","mem":"36.2","uptime":"632466"},"time":1647534342,"time_ms":540,"tm_ready":true,"total_max_power":195,"uplink":"eth0","uptime":632472,"version":"5.76.7.13442"}

M0okz commented 2 years ago

Salut, Quelques points à vérifier: • l’indicateur -p veut le chemin d’accès à votre fichier de mot de passe, pas sûr de ce que la chaîne moyenne de charge que vous avez là est censée faire • si vous spécifiez -p, alors sshpass doit être installé sur cette machine et dans votre $PATH • et enfin juste vérifier que vous exécutez ce test à partir du serveur Zabbix, n’est-ce pas? -P ... On Mar 17, 2022, at 6:29 AM, MOok_972 @.***> wrote: I always get this error with "-p" option : https://user-images.githubusercontent.com/87419947/158818713-29cbd40e-293d-46ed-82e2-4c0260fa2f34.png — Reply to this email directly, view it on GitHub <#30 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFHTJZVA5GTUBXYO75SLWDVAMXSJANCNFSM5QDSYSNQ. You are receiving this because you were mentioned.

I did the tests as above, and I had no problem using the password file

root@lxs-zabbix:~# sudo -u zabbix /usr/lib/zabbix/externalscripts/mca-dump-short.sh -d 172.16.20.52 -u admin -t SWITCH -p /var/lib/zabbix/ssh_keys/pws_admin {"anon_id":"6f844b44-43bc-4418-8786-a502cc9ee949","architecture":"armv7l","board_rev":7,"bootid":1,"bootrom_version":"usw-v1.1.4.115-g14af1ee6","cfgversion":"a26c1ff15f3400e0","connect_request_ip":"77.193.69.178","connect_request_port":"44878","default":false,"dhcp_server_table":[{"blocked":false,"ip":"172.16.50.250","last_seen":6368320,"mac":"18:e8:29:44:35:d9","port_idx":49,"vlan":55},{"blocked":false,"ip":"192.168.190.250","last_seen":784299,"mac":"18:e8:29:44:35:d9","port_idx":49,"vlan":50},{"blocked":false,"ip":"172.16.70.250","last_seen":6378453,"mac":"18:e8:29:44:35:d9","port_idx":49,"vlan":50},{"blocked":false,"ip":"172.30.0.1","last_seen":5630755,"mac":"18:e8:29:44:35:d9","port_idx":49,"vlan":40},{"blocked":false,"ip":"172.16.40.250","last_seen":6360957,"mac":"18:e8:29:44:35:d9","port_idx":49,"vlan":2},{"blocked":false,"ip":"172.16.20.250","last_seen":6384556,"mac":"18:e8:29:44:35:d9","port_idx":49,"vlan":1},{"blocked":false,"ip":"172.16.20.8","last_seen":1833658,"mac":"00:50:56:be:e3:23","port_idx":49,"vlan":1},{"blocked":true,"ip":"172.16.50.250","last_seen":5045330,"mac":"78:8a:20:ff:57:20","port_idx":8,"vlan":1}],"discovery_response":false,"dualboot":true,"ever_crash":false,"fan_level":70,"fw_caps":2806701605,"gateway_ip":"172.16.20.250","gateway_mac":"18:e8:29:44:35:d9","general_temperature":54,"guest_kicks":0,"guest_token":"D43B36DE0778452C382D49DDA6FA6DCE","has_eth1":false,"has_fan":true,"has_speaker":false,"has_temperature":true,"hash_id":"8786a502cc9ee949","hostname":"SWLOCALINFO4","hw_caps":0,"if_table":[{"full_duplex":true,"ip":"172.16.20.52","mac":"b4:fb:e4:b2:94:7b","name":"eth0","netmask":"255.255.255.0","num_port":52,"rx_bytes":437327963,"rx_dropped":0,"rx_errors":0,"rx_multicast":0,"rx_packets":39149317,"speed":10,"tx_bytes":1362684393,"tx_dropped":0,"tx_errors":0,"tx_packets":2057430,"up":true}],"inform_ip":"137.74.119.224","inform_min_interval":30,"inform_url":"http://wifi.sgdf.fr:8080/inform"

patricegautier commented 2 years ago

so the problem is still this then right?

Zabbix
Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 109: sshpass: command not found.{ "mcaDum... Failed: cannot extract value from json by path "$.['system-stats'].cpu": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 109: sshpass: command not found { "mcaDumpError": "ssh returned an error" }'

Preprocessing failed for: /usr/lib/zabbix/externalscripts/ssh-run.sh: line 55: sshpass: command not found Failed: cannot perform regular expression ".*load average: [^ ]*, ([0-9]+([.][0-9]+))" match for value of type "string": pattern does not match

If so, I would bet sshpass is not in the $PATH in place when zabbix executes the subcommand.. maybe try to install/cp it in a very well know place like /usr/bin see if that solves the problem?

mtheofy commented 2 years ago

FWIW, for a fresh debian 11 (bullseye) installation, I had to install sshpass since it's not installed by default.

M0okz commented 2 years ago

hey ! Sorry but i had install sshpass in the past, and verify it's in usr/bin. And the problem not solved.. in zabbix : image im on debian 10 image

M0okz commented 2 years ago

What's your controller version @mtheofy , im on 7.0.25 For sshpass im on 1.06

mtheofy commented 2 years ago

What's your controller version @mtheofy , im on 7.0.25 For sshpass im on 1.06

I am using the latest beta controller 7.1.60 and sshpass is 1.09

patricegautier commented 2 years ago

so the error message is now 'permission denied'.. Remember that those ssh invocations are run by zabbix under the user zabbix. Is the password file perhaps not readable by that user?

M0okz commented 2 years ago

I understood your advice, so I looked in this direction, first I passed sshpass in 1.09 :

`root@lxs-zabbix:/var/lib/zabbix/ssh_keys# sudo -u zabbix sshpass -f pws_admin ssh admin@172.16.10.250 -v OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1n 15 Mar 2022 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for debug1: Connecting to 172.16.10.250 [172.16.10.250] port 22. debug1: Connection established. debug1: identity file /var/lib/zabbix/.ssh/id_rsa type 0 debug1: identity file /var/lib/zabbix/.ssh/id_rsa-cert type -1 debug1: identity file /var/lib/zabbix/.ssh/id_dsa type -1 debug1: identity file /var/lib/zabbix/.ssh/id_dsa-cert type -1 debug1: identity file /var/lib/zabbix/.ssh/id_ecdsa type -1 debug1: identity file /var/lib/zabbix/.ssh/id_ecdsa-cert type -1 debug1: identity file /var/lib/zabbix/.ssh/id_ed25519 type -1 debug1: identity file /var/lib/zabbix/.ssh/id_ed25519-cert type -1 debug1: identity file /var/lib/zabbix/.ssh/id_xmss type -1 debug1: identity file /var/lib/zabbix/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Debian-4~bpo70+1 debug1: match: OpenSSH_6.6.1p1 Debian-4~bpo70+1 pat OpenSSH_6.6.1 compat 0x04000002 debug1: Authenticating to 172.16.10.250:22 as 'admin' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:XciRV2AFm5BY4v4UVsNGYngHu6q13jD7TrRMi1sWHXI debug1: Host '172.16.10.250' is known and matches the ECDSA host key. debug1: Found key in /var/lib/zabbix/.ssh/known_hosts:1 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after 134217728 blocks debug1: Will attempt key: /var/lib/zabbix/.ssh/id_rsa RSA SHA256:8yzWeNTjRP+NP1Jfro/ZkKApiMopK0eMEt1kBv6l2js debug1: Will attempt key: /var/lib/zabbix/.ssh/id_dsa debug1: Will attempt key: /var/lib/zabbix/.ssh/id_ecdsa debug1: Will attempt key: /var/lib/zabbix/.ssh/id_ed25519 debug1: Will attempt key: /var/lib/zabbix/.ssh/id_xmss debug1: SSH2_MSG_SERVICE_ACCEPT received Welcome to EdgeOS

By logging in, accessing, or using the Ubiquiti product, you acknowledge that you have read and understood the Ubiquiti License Agreement (available in the Web UI at, by default, http://192.168.1.1) and agree to be bound by its terms.

debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: /var/lib/zabbix/.ssh/id_rsa RSA SHA256:8yzWeNTjRP+NP1Jfro/ZkKApiMopK0eMEt1kBv6l2js debug1: Authentications that can continue: publickey,password debug1: Trying private key: /var/lib/zabbix/.ssh/id_dsa debug1: Trying private key: /var/lib/zabbix/.ssh/id_ecdsa debug1: Trying private key: /var/lib/zabbix/.ssh/id_ed25519 debug1: Trying private key: /var/lib/zabbix/.ssh/id_xmss debug1: Next authentication method: password debug1: Authentication succeeded (password). Authenticated to 172.16.10.250 ([172.16.10.250]:22). debug1: channel 0: new [client-session] debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug1: pledge: network debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /home/admin/.ssh debug1: Sending environment. debug1: Sending env LANG = fr_FR.UTF-8 Linux GWCN 3.10.107-UBNT #1 SMP Wed Oct 20 09:02:28 UTC 2021 mips64

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

  Welcome to EdgeOS on UniFi Security Gateway!

** WARNING! **

Last login: Sun Apr 10 21:47:00 2022 from 172.16.70.13 admin@GWCN:~$ `

patricegautier commented 2 years ago

So this looks like a problem:

Remote: Ignored authorized keys: bad ownership or modes for directory /home/admin/.ssh

this is on the USG's side.

Those are the permissions I have here:

$ ls -ld .ssh drwxr-x--- 2 patrice users 4096 Oct 21 03:20 .ssh

M0okz commented 2 years ago

I have same on my USG-XG-8 : image

patricegautier commented 2 years ago

so what the failure message in zabbix now for those items? still the same?

M0okz commented 2 years ago

image yes always same error im testing with one of my switch and i get another error : image or Timeout while executing a shell script.

M0okz commented 2 years ago

Good news, today !! It's works fine now. However it works when zabbix server directly pull all data, but i my case i have 2 proxy for all my devices, i need to configure same installation on the zabbix server on the proxy ?

patricegautier commented 2 years ago

Good news! Do you know what you did that made it work?

Yes you need to duplicate the setup for each proxy.. Note that there is a 1h default for changes you make from the zabbix web UI to propagate to proxies..

M0okz commented 2 years ago

Ok i will do this ! Not really but i think, the rights on certificate folder : image

patricegautier commented 2 years ago

That would make sense. ssh checks those permissions..

patricegautier commented 2 years ago

That would make sense..

Sent from my iPhone

On Apr 14, 2022, at 12:08 AM, MOok_972 @.***> wrote:

 Ok i will do this ! Not really but i think, the rights on certificate folder :

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

patricegautier commented 2 years ago

It’s a sign! Maybe try the public key approach :) ?

It’s more secure anyway.

-P

On Mar 23, 2022, at 6:41 AM, Marcos @.***> wrote:

FWIW, for a fresh debian 11 (bullseye) installation, I had to install sshpass since it's not installed by default.

— Reply to this email directly, view it on GitHub https://github.com/patricegautier/unifiZabbix/issues/30#issuecomment-1076389481, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFHTJZLXJBFGU36GWXCDN3VBMNRLANCNFSM5QDSYSNQ. You are receiving this because you were mentioned.