--- /dev/null
+#
+# Copyright (C) 2018-2020 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-ubus
+PKG_VERSION:=0.1.1
+PKG_RELEASE:=$(AUTORELEASE)
+
+PYPI_NAME:=ubus
+PKG_HASH:=7e57bda989bc35b48c7075d03ec2818226e722bbf1bde138d7e7ea26d462682a
+
+PKG_MAINTAINER:=Erik Larsson <who+openwrt@cnackers.org>
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=LICENSE
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-ubus
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Python3 ubus
+ URL:=https://gitlab.nic.cz/turris/python-ubus/
+ DEPENDS:=+libubus +libblobmsg-json +python3-light
+endef
+
+define Package/python3-ubus/description
+ Python bindings for ubus.
+endef
+
+$(eval $(call Py3Package,python3-ubus))
+$(eval $(call BuildPackage,python3-ubus))
+$(eval $(call BuildPackage,python3-ubus-src))
PKG_NAME:=libxml2
PKG_VERSION:=2.9.10
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://xmlsoft.org/sources/
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
define Package/libxml2
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Gnome XML library
URL:=http://xmlsoft.org/
- DEPENDS:=+libpthread +zlib
+ DEPENDS:=+libpthread +zlib $(ICONV_DEPENDS)
endef
define Package/libxml2/description
--with-html \
--without-ftp \
--without-http \
- --without-iconv \
--without-iso8859x \
--without-legacy \
--with-output \
PKG_NAME:=acme
PKG_VERSION:=2.8.7
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/acmesh-official/acme.sh/tar.gz/$(PKG_VERSION)?
# commit and reload is in post_checks
fi
- if [ -e /etc/init.d/nginx ] && [ "$update_nginx" -eq "1" ]; then
+ local nginx_updated
+ nginx_updated=0
+ if command -v nginx-util 2>/dev/null && [ "$update_nginx" -eq "1" ]; then
+ nginx_updated=1
+ for domain in $domains; do
+ nginx-util add_ssl "${domain}" acme "${domain_dir}/fullchain.cer" \
+ "${domain_dir}/${main_domain}.key" || nginx_updated=0
+ done
+ # reload is in post_checks
+ fi
+
+ if [ "$nginx_updated" -eq "0" ] && [ -w /etc/nginx/nginx.conf ] && [ "$update_nginx" -eq "1" ]; then
sed -i "s#ssl_certificate\ .*#ssl_certificate ${domain_dir}/fullchain.cer;#g" /etc/nginx/nginx.conf
sed -i "s#ssl_certificate_key\ .*#ssl_certificate_key ${domain_dir}/${main_domain}.key;#g" /etc/nginx/nginx.conf
# commit and reload is in post_checks
include $(TOPDIR)/rules.mk
PKG_NAME:=frr
PKG_VERSION:=7.5
-PKG_RELEASE:=3
-PKG_SOURCE_DATE:=2021-01-22
+PKG_RELEASE:=4
+PKG_SOURCE_DATE:=2021-02-05
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
-PKG_SOURCE_VERSION:=a4af08a19e93cc8560f571ffc4819d53ed35ad66
+PKG_SOURCE_VERSION:=20b35e4c3386de798f3b0cb9f2a7e6b04d995485
PKG_SOURCE_URL:=https://codeload.github.com/FRRouting/frr/tar.gz/$(PKG_SOURCE_VERSION)?
-PKG_HASH:=69bcbcde984560e9c41f52f5c509c58ea3d8d287750cc546d3a95e2ec9110dd4
+PKG_HASH:=f3b4a4ce43ad60fcf4b908dc4467cbc9dae277b5829489b3d221913e043dd250
PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
echo "$@" >&2
}
+# "/usr/lib/frr/frrinit.sh start somenamespace"
+FRR_PATHSPACE="$2"
self="`dirname $0`"
if [ -r "$self/frrcommon.sh" ]; then
. "$self/frrcommon.sh"
# file does not exist.
#
# This script should be installed in /usr/sbin/frrcommon.sh
+# FRR_PATHSPACE is passed in from watchfrr
+suffix="${FRR_PATHSPACE:+/${FRR_PATHSPACE}}"
+nsopt="${FRR_PATHSPACE:+-N ${FRR_PATHSPACE}}"
PATH=/bin:/usr/bin:/sbin:/usr/sbin
D_PATH="/usr/sbin" # /usr/lib/frr
FRR_USER="network" # frr
FRR_GROUP="network" # frr
FRR_VTY_GROUP="" # frrvty
+FRR_CONFIG_MODE="0600" # 0600
+FRR_DEFAULT_PROFILE="traditional" # traditional / datacenter
# ORDER MATTERS FOR $DAEMONS!
# - keep zebra first
chownfrr() {
[ -n "$FRR_USER" ] && chown "$FRR_USER" "$1"
[ -n "$FRR_GROUP" ] && chgrp "$FRR_GROUP" "$1"
+ [ -n "$FRR_CONFIG_MODE" ] && chmod "$FRR_CONFIG_MODE" "$1"
+ if [ -d "$1" ]; then
+ chmod u+x "$1"
+ fi
}
vtysh_b () {
[ "$1" = "watchfrr" ] && return 0
[ -r "$C_PATH/frr.conf" ] || return 0
if [ -n "$1" ]; then
- "$VTYSH" -b -n -d "$1"
+ "$VTYSH" `echo $nsopt` -b -d "$1"
else
- "$VTYSH" -b -n
+ "$VTYSH" `echo $nsopt` -b
fi
}
continue
fi
debug "$daemon enabled"
- enabled="$enabled $daemon"
+# enabled="$enabled $daemon"
+
if [ -n "$inst" ]; then
debug "$daemon multi-instance $inst"
oldifs="${IFS}"
enabled="$enabled $daemon-$i"
done
IFS="${oldifs}"
+ else
+ enabled="$enabled $daemon"
fi
else
debug "$daemon disabled"
instopt="${inst:+-n $inst}"
eval args="\$${daemon}_options"
- if eval "$all_wrap $wrap $bin -d $instopt $args"; then
+ if eval "$all_wrap $wrap $bin $nsopt -d $frr_global_options $instopt $args"; then
log_success_msg "Started $dmninst"
vtysh_b "$daemon"
else
}
. "$C_PATH/daemons"
-load_old_config "$C_PATH/daemons.conf"
-load_old_config "/etc/default/frr"
-load_old_config "/etc/sysconfig/frr"
+if [ -z "$FRR_PATHSPACE" ]; then
+ load_old_config "$C_PATH/daemons.conf"
+ load_old_config "/etc/default/frr"
+ load_old_config "/etc/sysconfig/frr"
+fi
if { declare -p watchfrr_options 2>/dev/null || true; } | grep -q '^declare \-a'; then
log_warning_msg "watchfrr_options contains a bash array value." \
unset watchfrr_options
fi
+if test -z "$frr_profile"; then
+ # try to autodetect config profile
+ if test -d /etc/cumulus; then
+ frr_profile=datacenter
+ # elif test ...; then
+ # -- add your distro/system here
+ elif test -n "$FRR_DEFAULT_PROFILE"; then
+ frr_profile="$FRR_DEFAULT_PROFILE"
+ fi
+fi
+test -n "$frr_profile" && frr_global_options="$frr_global_options -F $frr_profile"
+
+
#
# other defaults and dispatch
#
include $(TOPDIR)/rules.mk
PKG_NAME:=mosquitto
-PKG_VERSION:=2.0.5
+PKG_VERSION:=2.0.7
PKG_RELEASE:=1
PKG_LICENSE:=EPL-2.0
PKG_LICENSE_FILES:=LICENSE.txt
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://mosquitto.org/files/source/
-PKG_HASH:=67eaeb4160e5793715c017f53c4f42808d76129b7ad131d765a6a23792e58d5d
+PKG_HASH:=a98054f0b8161588975ef24e1d467550d3935f4c16ccee63ecb623248a28356e
include $(INCLUDE_DIR)/package.mk
PKG_NAME:=strongswan
PKG_VERSION:=5.9.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://download.strongswan.org/ https://download2.strongswan.org/
swan_xappend " daemon {"
swan_xappend " default = $debug"
swan_xappend " }"
- swan_xappend " auth {"
- swan_xappend " default = $debug"
- swan_xappend " }"
swan_xappend " }"
swan_xappend "}"
}
# commit and reload is in post_checks
fi
- if [ -e /etc/init.d/nginx ] && [ "$update_nginx" -eq "1" ]; then
+ local nginx_updated
+ nginx_updated=0
+ if command -v nginx-util 2>/dev/null && [ "$update_nginx" -eq "1" ]; then
+ nginx_updated=1
+ for domain in $domains; do
+ if [ "$APP" = "uacme" ]; then
+ nginx-util add_ssl "${domain}" uacme "$STATE_DIR/${main_domain}/cert.pem" \
+ "$STATE_DIR/private/${main_domain}/key.pem" || nginx_updated=0
+ else
+ nginx-util add_ssl "${domain}" acme "$STATE_DIR/${main_domain}/fullchain.cer" \
+ "$STATE_DIR/${main_domain}/${main_domain}.key" || nginx_updated=0
+ fi
+ done
+ # reload is in post_checks
+ fi
+
+ if [ "$nginx_updated" -eq "0" ] && [ -w /etc/nginx/nginx.conf ] && [ "$update_nginx" -eq "1" ]; then
if [ "$APP" = "uacme" ]; then
sed -i "s#ssl_certificate\ .*#ssl_certificate $STATE_DIR/${main_domain}/cert.pem;#g" /etc/nginx/nginx.conf
sed -i "s#ssl_certificate_key\ .*#ssl_certificate_key $STATE_DIR/private/${main_domain}/key.pem;#g" /etc/nginx/nginx.conf
define Package/wg-installer-server
$(call Package/wg-installer/Default)
TITLE+= (server)
+ MENU:=1
DEPENDS:=+rpcd +uhttpd +uhttpd-mod-ubus +owipcalc
endef
fi
endef
+define Package/wg-installer-server-hotplug-babeld
+ $(call Package/wg-installer-server)
+ DEPENDS:=wg-installer-server
+endef
+
+define Package/wg-installer-server-hotplug-babeld/install
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/net/
+ $(INSTALL_BIN) ./wg-server/hotplug.d/99-mesh-babeld $(1)/etc/hotplug.d/net/99-mesh-babeld
+endef
+
define Package/wg-installer-client
$(call Package/wg-installer/Default)
TITLE+= (client)
endef
$(eval $(call BuildPackage,wg-installer-server))
+$(eval $(call BuildPackage,wg-installer-server-hotplug-babeld))
$(eval $(call BuildPackage,wg-installer-client))
Register Tunnel Interface
wg-client-installer register --ip 127.0.0.1 --user wginstaller --password wginstaller --bandwidth 10
+
+## Hotplugs
+
+- wg-installer-server-hotplug-babeld: mesh automatically via wireguard with babeld
--- /dev/null
+#!/bin/sh
+
+# check if wireguard
+if [ "${DEVTYPE}" != "wireguard" ]; then
+ exit 0
+fi
+
+# check if correct naming
+slicedint=$(echo $INTERFACE | cut -c1-3)
+if [ "${slicedint}" != "wg_" ]; then
+ exit 0
+fi
+
+if [ "${ACTION}" == "add" ]; then
+ uci add babeld interface
+ uci set babeld.@interface[-1].ifname="${INTERFACE}"
+ uci commit
+ /etc/init.d/babeld reload
+fi
+
+if [ "${ACTION}" == "remove" ]; then
+ i=0
+ while uci get babeld.@interface[$i] &> /dev/null ; do
+ if [ "$(uci get babeld.@interface[$i].ifname)" == "${INTERFACE}" ]; then
+ uci delete babeld.@interface[$i]
+ fi
+ i=$((i+1));
+ done
+ uci commit
+ /etc/init.d/babeld reload
+fi
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=oci-runtime-tools
+PKG_VERSION:=1.0.0-pre20210122
+PKG_RELEASE:=1
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_NAME:=runtime-tools
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/opencontainers/runtime-tools.git
+PKG_SOURCE_VERSION:=453547deb724af135587e654f52d86b8619f21b9
+PKG_MIRROR_HASH:=34f3aefc4f6f3bb93330ec7cbeb2eb987b82184da53d453e8b04b5750faa8728
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/opencontainers/runtime-tools/
+GO_PKG_LDFLAGS_X:=main.gitCommit=$(PKG_SOURCE_VERSION) main.version=$(PKG_SOURCE_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/oci-runtime-tool
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=oci-runtime-tool
+ URL:=https://github.com/opencontainers/runtime-tools
+ DEPENDS:=$(GO_ARCH_DEPENDS)
+endef
+
+define Package/oci-runtime-tool/description
+ OCI (Open Container Initiative) runtime tools
+ Generate OCI runtime spec configuration files and validate OCI bundles.
+endef
+
+define Package/oci-runtime-tests
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=OCI runtimetest tool
+ URL:=https://github.com/opencontainers/runtime-tools
+ DEPENDS:=@(i386||i686||x86_64) oci-runtime-tool +tar
+endef
+
+define Package/oci-runtime-tests/description
+ OCI (Open Container Initiative) runtime tools
+ This package provides test cases as well as artifacts required to
+ validate an OCI runtime.
+ Best used in combination with a TAP consumer like 'node-tap',
+ installable via npm.
+endef
+
+define Build/Compile
+ $(call GoPackage/Build/Compile)
+ $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
+endef
+
+define Package/oci-runtime-tool/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/oci-runtime-tool $(1)/usr/bin
+endef
+
+define Package/oci-runtime-tests/install
+ $(INSTALL_DIR) $(1)/usr/libexec/oci-runtime-test
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/runtimetest $(1)/usr/libexec/oci-runtime-test/
+ ( cd $(PKG_BUILD_DIR) ; $(FIND) ./validation/ -name *.go | grep -v util | \
+ xargs -I'%' -n 1 basename % .go | while read testbin; do \
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$${testbin} \
+ $(1)/usr/libexec/oci-runtime-test/$$$${testbin}.t ; \
+ done )
+ifdef CONFIG_x86_64
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/rootfs-amd64.tar.gz $(1)/usr/libexec/oci-runtime-test
+endif
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/rootfs-386.tar.gz $(1)/usr/libexec/oci-runtime-test
+endef
+
+$(eval $(call GoBinPackage,oci-runtime-tools))
+$(eval $(call BuildPackage,oci-runtime-tool))
+$(eval $(call BuildPackage,oci-runtime-tests))
--- /dev/null
+From 6502e57dbebcacd9b55fc7a80655c8f31d7dae8f Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Mon, 8 Feb 2021 01:26:31 +0000
+Subject: [PATCH] Fix build of hugetlb tests on 32-bit platforms
+
+https://github.com/opencontainers/runtime-tools/pull/712
+
+Use explicit 64-bit types to avoid fall-back on incompatible 32-bit
+types on 32-bit platforms.
+
+Fixes: #711
+Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+---
+ validation/linux_cgroups_hugetlb/linux_cgroups_hugetlb.go | 2 +-
+ .../linux_cgroups_relative_hugetlb.go | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/validation/linux_cgroups_hugetlb/linux_cgroups_hugetlb.go b/validation/linux_cgroups_hugetlb/linux_cgroups_hugetlb.go
+index d71dfb9e..e1db3f1b 100644
+--- a/validation/linux_cgroups_hugetlb/linux_cgroups_hugetlb.go
++++ b/validation/linux_cgroups_hugetlb/linux_cgroups_hugetlb.go
+@@ -24,7 +24,7 @@ func testHugetlbCgroups() error {
+ // When setting the limit just for checking if writing works, the amount of memory
+ // requested does not matter, as all insigned integers will be accepted.
+ // Use 2GiB as an example
+- const limit = 2 * (1 << 30)
++ var limit uint64 = 2 * (1 << 30)
+
+ for _, pageSize := range pageSizes {
+ g, err := util.GetDefaultGenerator()
+diff --git a/validation/linux_cgroups_relative_hugetlb/linux_cgroups_relative_hugetlb.go b/validation/linux_cgroups_relative_hugetlb/linux_cgroups_relative_hugetlb.go
+index b6d7ae81..583a9fa8 100644
+--- a/validation/linux_cgroups_relative_hugetlb/linux_cgroups_relative_hugetlb.go
++++ b/validation/linux_cgroups_relative_hugetlb/linux_cgroups_relative_hugetlb.go
+@@ -21,7 +21,7 @@ func main() {
+ // When setting the limit just for checking if writing works, the amount of memory
+ // requested does not matter, as all insigned integers will be accepted.
+ // Use 2GiB as an example
+- const limit = 2 * (1 << 30)
++ var limit uint64 = 2 * (1 << 30)
+
+ for _, pageSize := range pageSizes {
+ g, err := util.GetDefaultGenerator()
include $(TOPDIR)/rules.mk
PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2020.12.07
-PKG_RELEASE:=2
+PKG_VERSION:=2021.01.27
+PKG_RELEASE:=1
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=Apache-2.0
-local function scrape()
- local fd = io.popen("/etc/init.d/dsl_control lucistat")
- local dsl_func = loadstring(fd:read("*a"))
- fd:close()
-
- if not dsl_func then
- return
- end
-
- local dsl_stat = dsl_func()
+local ubus = require "ubus"
+local function scrape()
local dsl_line_attenuation = metric("dsl_line_attenuation_db", "gauge")
local dsl_signal_attenuation = metric("dsl_signal_attenuation_db", "gauge")
local dsl_snr = metric("dsl_signal_to_noise_margin_db", "gauge")
local dsl_error_seconds_total = metric("dsl_error_seconds_total", "counter")
local dsl_errors_total = metric("dsl_errors_total", "counter")
+ local u = ubus.connect()
+ local m = u:call("dsl", "metrics", {})
+
-- dsl hardware/firmware information
metric("dsl_info", "gauge", {
- atuc_vendor_id = dsl_stat.atuc_vendor_id,
- atuc_system_vendor_id = dsl_stat.atuc_system_vendor_id,
- chipset = dsl_stat.chipset,
- firmware_version = dsl_stat.firmware_version,
- api_version = dsl_stat.api_version,
+ atuc_vendor = m.atu_c.vendor,
+ atuc_system_vendor = m.atu_c.system_vendor,
+ chipset = m.chipset,
+ firmware_version = m.firmware_version,
+ api_version = m.api_version,
}, 1)
-- dsl line settings information
metric("dsl_line_info", "gauge", {
- xtse1 = dsl_stat.xtse1,
- xtse2 = dsl_stat.xtse2,
- xtse3 = dsl_stat.xtse3,
- xtse4 = dsl_stat.xtse4,
- xtse5 = dsl_stat.xtse5,
- xtse6 = dsl_stat.xtse6,
- xtse7 = dsl_stat.xtse7,
- xtse8 = dsl_stat.xtse8,
- annex = dsl_stat.annex_s,
- mode = dsl_stat.line_mode_s,
- profile = dsl_stat.profile_s,
+ annex = m.annex,
+ mode = m.mode,
+ profile = m.profile,
}, 1)
- -- dsl up is 1 if the line is up and running
local dsl_up
- if dsl_stat.line_state == "UP" then
+ if m.up then
dsl_up = 1
else
dsl_up = 0
end
metric("dsl_up", "gauge", {
- detail = dsl_stat.line_state_detail,
+ detail = m.state,
}, dsl_up)
-- dsl line status data
- metric("dsl_uptime_seconds", "gauge", {}, dsl_stat.line_uptime)
+ metric("dsl_uptime_seconds", "gauge", {}, m.uptime)
-- dsl db measurements
- dsl_line_attenuation({direction="down"}, dsl_stat.line_attenuation_down)
- dsl_line_attenuation({direction="up"}, dsl_stat.line_attenuation_up)
- dsl_signal_attenuation({direction="down"}, dsl_stat.signal_attenuation_down)
- dsl_signal_attenuation({direction="up"}, dsl_stat.signal_attenuation_up)
- dsl_snr({direction="down"}, dsl_stat.noise_margin_down)
- dsl_snr({direction="up"}, dsl_stat.noise_margin_up)
- dsl_aggregated_transmit_power({direction="down"}, dsl_stat.actatp_down)
- dsl_aggregated_transmit_power({direction="up"}, dsl_stat.actatp_up)
+ dsl_line_attenuation({direction="down"}, m.downstream.latn)
+ dsl_line_attenuation({direction="up"}, m.upstream.latn)
+ dsl_signal_attenuation({direction="down"}, m.downstream.satn)
+ dsl_signal_attenuation({direction="up"}, m.upstream.satn)
+ dsl_snr({direction="down"}, m.downstream.snr)
+ dsl_snr({direction="up"}, m.upstream.snr)
+ dsl_aggregated_transmit_power({direction="down"}, m.downstream.actatp)
+ dsl_aggregated_transmit_power({direction="up"}, m.upstream.actatp)
-- dsl performance data
- if dsl_stat.latency_down ~= nil then
- dsl_latency({direction="down"}, dsl_stat.latency_down / 1000000)
- dsl_latency({direction="up"}, dsl_stat.latency_up / 1000000)
+ if m.downstream.interleave_delay ~= nil then
+ dsl_latency({direction="down"}, m.downstream.interleave_delay / 1000000)
+ dsl_latency({direction="up"}, m.upstream.interleave_delay / 1000000)
end
- dsl_datarate({direction="down"}, dsl_stat.data_rate_down)
- dsl_datarate({direction="up"}, dsl_stat.data_rate_up)
- dsl_max_datarate({direction="down"}, dsl_stat.max_data_rate_down)
- dsl_max_datarate({direction="up"}, dsl_stat.max_data_rate_up)
+ dsl_datarate({direction="down"}, m.downstream.data_rate)
+ dsl_datarate({direction="up"}, m.upstream.data_rate)
+ dsl_max_datarate({direction="down"}, m.downstream.attndr)
+ dsl_max_datarate({direction="up"}, m.upstream.attndr)
-- dsl errors
- dsl_error_seconds_total({err="forward error correction",loc="near"}, dsl_stat.errors_fecs_near)
- dsl_error_seconds_total({err="forward error correction",loc="far"}, dsl_stat.errors_fecs_far)
- dsl_error_seconds_total({err="errored",loc="near"}, dsl_stat.errors_es_near)
- dsl_error_seconds_total({err="errored",loc="far"}, dsl_stat.errors_es_near)
- dsl_error_seconds_total({err="severely errored",loc="near"}, dsl_stat.errors_ses_near)
- dsl_error_seconds_total({err="severely errored",loc="near"}, dsl_stat.errors_ses_near)
- dsl_error_seconds_total({err="loss of signal",loc="near"}, dsl_stat.errors_loss_near)
- dsl_error_seconds_total({err="loss of signal",loc="far"}, dsl_stat.errors_loss_far)
- dsl_error_seconds_total({err="unavailable",loc="near"}, dsl_stat.errors_uas_near)
- dsl_error_seconds_total({err="unavailable",loc="far"}, dsl_stat.errors_uas_far)
- dsl_errors_total({err="header error code error",loc="near"}, dsl_stat.errors_hec_near)
- dsl_errors_total({err="header error code error",loc="far"}, dsl_stat.errors_hec_far)
- dsl_errors_total({err="non pre-emptive crc error",loc="near"}, dsl_stat.errors_crc_p_near)
- dsl_errors_total({err="non pre-emptive crc error",loc="far"}, dsl_stat.errors_crc_p_far)
- dsl_errors_total({err="pre-emptive crc error",loc="near"}, dsl_stat.errors_crcp_p_near)
- dsl_errors_total({err="pre-emptive crc error",loc="far"}, dsl_stat.errors_crcp_p_far)
+ dsl_error_seconds_total({err="forward error correction", loc="near"}, m.errors.near.fecs)
+ dsl_error_seconds_total({err="forward error correction", loc="far"}, m.errors.far.fecs)
+ dsl_error_seconds_total({err="errored", loc="near"}, m.errors.near.es)
+ dsl_error_seconds_total({err="errored", loc="far"}, m.errors.far.es)
+ dsl_error_seconds_total({err="severely errored", loc="near"}, m.errors.near.ses)
+ dsl_error_seconds_total({err="severely errored", loc="far"}, m.errors.far.ses)
+ dsl_error_seconds_total({err="loss of signal", loc="near"}, m.errors.near.loss)
+ dsl_error_seconds_total({err="loss of signal", loc="far"}, m.errors.far.loss)
+ dsl_error_seconds_total({err="unavailable", loc="near"}, m.errors.near.uas)
+ dsl_error_seconds_total({err="unavailable", loc="far"}, m.errors.far.uas)
+ dsl_errors_total({err="header error code error", loc="near"}, m.errors.near.hec)
+ dsl_errors_total({err="header error code error", loc="far"}, m.errors.far.hec)
+ dsl_errors_total({err="non pre-emptive crc error", loc="near"}, m.errors.near.crc_p)
+ dsl_errors_total({err="non pre-emptive crc error", loc="far"}, m.errors.far.crc_p)
+ dsl_errors_total({err="pre-emptive crc error", loc="near"}, m.errors.near.crcp_p)
+ dsl_errors_total({err="pre-emptive crc error", loc="far"}, m.errors.far.crcp_p)
end
return { scrape = scrape }