Commit 32eaae34 authored by Peter Möller's avatar Peter Möller

Update host-monitor.sh

parent d1358607
......@@ -64,7 +64,8 @@ VMenv=""
# Get more platform data
PlatformManufacturer="$(/sbin/dmidecode -t 2 2>/dev/null | egrep "^\s*Manufacturer:" | cut -d: -f2 | cut -c2-)" # Ex: PlatformManufacturer='Type2 - Board Vendor Name1'
PlatformType="$(/sbin/dmidecode -t 2 2>/dev/null | egrep "^\s*Type:" | cut -d: -f2 | cut -c2-)" # Ex: PlatformType=Motherboard
Platform="$(egrep upnpmodelname /etc/synoinfo.conf | cut -d\" -f2)"
DeviceType="$(egrep "upnpdevicetype" /etc/synoinfo.conf | cut -d\" -f2)"
ModelName="$(egrep "upnpmodelname" /etc/synoinfo.conf | cut -d\" -f2)"
# Network interfaces
IFs=$(/sbin/ip a |awk '/state UP/{print $2}' | sed 's/://')
......@@ -128,7 +129,7 @@ NIStr="\"network-interfaces\": [ $(echo "${OUTPUT}" | sed 's/,$//') ]"
# Ex: NIStr='"network-interfaces": [ { "interface": "ens192", "ip4": "130.235.16.11/23", "ip6": "fe80::250:56ff:feb6:b194/64", "mac": "00:50:56:b6:b1:94", "mac-p": "00:50:56:b6:b1:94", "speed": "10000Mb/s" } ]'
# Platform
PlatformStr="\"platform\": { \"virtualized\": false, \"name\": \"Model: $Platform\" }"
PlatformStr="\"platform\": { \"virtualized\": false, \"name\": \"Model: $DeviceType $ModelName\" }"
# network
AliasName=", \"alias\": [\"$DNSAlias\"] "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment