From ffc399b5de232c04cb65425b07037eed5bc024f9 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Thu, 14 May 2026 09:52:26 +0100 Subject: [PATCH] After making api routes accessible under admin now by default, some scripts need updating to reflect same --- tools/runtime/nagios/ixp-manager-check-core-bundles.sh | 2 +- tools/runtime/nagios/ixp-manager-check-switch.sh | 2 +- tools/runtime/nagios/nagios-global-vars.sh | 2 +- tools/runtime/nagios/update-nagios.sh | 2 +- tools/runtime/route-servers/nagios-check-last-updated.php | 2 +- .../runtime/route-servers/nagios-check-locked-routers.php | 2 +- .../api-reconfigure-example-birdv2.sh | 8 ++++---- tools/runtime/smokeping/update-smokeping.sh | 2 +- tools/runtime/tacacs/update-tacacs.sh | 2 +- tools/vagrant/scripts/ixpm-reconfigure-routers-bird2.sh | 8 ++++---- tools/vagrant/scripts/rc-reconfigure.sh | 6 +++--- tools/vagrant/scripts/rs-api-reconfigure.sh | 6 +++--- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tools/runtime/nagios/ixp-manager-check-core-bundles.sh b/tools/runtime/nagios/ixp-manager-check-core-bundles.sh index f2ca227f7..a8178fc61 100755 --- a/tools/runtime/nagios/ixp-manager-check-core-bundles.sh +++ b/tools/runtime/nagios/ixp-manager-check-core-bundles.sh @@ -61,7 +61,7 @@ if [ -z "${APIKEY}" ] || [ -z "${ID}" ]; then usage fi -STATUS="$( wget -O - -q "${URL}/api/v4/switch/${ID}/core-bundles-status?apikey=${APIKEY}" )" +STATUS="$( wget -O - -q "${URL}/admin/api/v4/switch/${ID}/core-bundles-status?apikey=${APIKEY}" )" if [ $? -ne 0 ] || [ -z "$STATUS" ]; then echo Could not query core bundle status via API diff --git a/tools/runtime/nagios/ixp-manager-check-switch.sh b/tools/runtime/nagios/ixp-manager-check-switch.sh index 617304aeb..4db511ad8 100755 --- a/tools/runtime/nagios/ixp-manager-check-switch.sh +++ b/tools/runtime/nagios/ixp-manager-check-switch.sh @@ -62,7 +62,7 @@ if [ -z "${APIKEY}" ] || [ -z "${ID}" ]; then fi -STATUS="$( wget -O - -q "${URL}/api/v4/switch/${ID}/status?apikey=${APIKEY}" )" +STATUS="$( wget -O - -q "${URL}/admin/api/v4/switch/${ID}/status?apikey=${APIKEY}" )" if [ $? -ne 0 ] || [ -z "$STATUS" ]; then echo Could not query switch status via API diff --git a/tools/runtime/nagios/nagios-global-vars.sh b/tools/runtime/nagios/nagios-global-vars.sh index bf2697c75..1942b8232 100644 --- a/tools/runtime/nagios/nagios-global-vars.sh +++ b/tools/runtime/nagios/nagios-global-vars.sh @@ -29,7 +29,7 @@ ## SET THE FOLLOWING VARIABLES APPROPRIATELY KEY="your-ixp-manager-apikey-here" -URL="https://www.example.com/ixp/api/v4/nagios" +URL="https://www.example.com/ixp/admin/api/v4/nagios" # where to store the Nagios host/service configuration files: CONFPATH="/usr/local/etc/nagios/conf.d" diff --git a/tools/runtime/nagios/update-nagios.sh b/tools/runtime/nagios/update-nagios.sh index 3c34e31e2..fcb078ee3 100644 --- a/tools/runtime/nagios/update-nagios.sh +++ b/tools/runtime/nagios/update-nagios.sh @@ -31,7 +31,7 @@ KEY="your-ixp-manager-apikey-here" -URL="https://ixp.example.com/api/v4/nagios" +URL="https://ixp.example.com/admin/api/v4/nagios" # where to store the Nagios host/service configuration files: CONFPATH="/etc/nagios/conf.d" diff --git a/tools/runtime/route-servers/nagios-check-last-updated.php b/tools/runtime/route-servers/nagios-check-last-updated.php index e8aca31d4..929f4fcd9 100644 --- a/tools/runtime/route-servers/nagios-check-last-updated.php +++ b/tools/runtime/route-servers/nagios-check-last-updated.php @@ -22,7 +22,7 @@ // variables - you need to change these! $key="your-api-key"; -$url="https://ixp.example.com/api/v4/router/updated"; +$url="https://ixp.example.com/admin/api/v4/router/updated"; $threshold=86400; // is curl available? diff --git a/tools/runtime/route-servers/nagios-check-locked-routers.php b/tools/runtime/route-servers/nagios-check-locked-routers.php index 3a1fab015..0332483b9 100644 --- a/tools/runtime/route-servers/nagios-check-locked-routers.php +++ b/tools/runtime/route-servers/nagios-check-locked-routers.php @@ -22,7 +22,7 @@ // variables - you need to change these! $key="your-api-key"; -$url="https://ixp.example.com/api/v4/router/locked-longer-than"; +$url="https://ixp.example.com/admin/api/v4/router/locked-longer-than"; $threshold=7200; // is curl available? diff --git a/tools/runtime/router-reconfigure-scripts/api-reconfigure-example-birdv2.sh b/tools/runtime/router-reconfigure-scripts/api-reconfigure-example-birdv2.sh index 11f3a9f0a..814ebd7ff 100755 --- a/tools/runtime/router-reconfigure-scripts/api-reconfigure-example-birdv2.sh +++ b/tools/runtime/router-reconfigure-scripts/api-reconfigure-example-birdv2.sh @@ -40,10 +40,10 @@ ALLOWED_HANDLES="rs1-ipv4 rs1-ipv6" # --- the following should be fine on a typical Debian / Ubuntu system: -URL_LOCK="${URLROOT}/api/v4/router/get-update-lock" -URL_CONF="${URLROOT}/api/v4/router/gen-config" -URL_RELEASE="${URLROOT}/api/v4/router/release-update-lock" -URL_DONE="${URLROOT}/api/v4/router/updated" +URL_LOCK="${URLROOT}/admin/api/v4/router/get-update-lock" +URL_CONF="${URLROOT}/admin/api/v4/router/gen-config" +URL_RELEASE="${URLROOT}/admin/api/v4/router/release-update-lock" +URL_DONE="${URLROOT}/admin/api/v4/router/updated" BIRDBIN="/usr/sbin/bird" ETCPATH="/usr/local/etc/bird" diff --git a/tools/runtime/smokeping/update-smokeping.sh b/tools/runtime/smokeping/update-smokeping.sh index 81ad9765f..e207e7393 100755 --- a/tools/runtime/smokeping/update-smokeping.sh +++ b/tools/runtime/smokeping/update-smokeping.sh @@ -26,7 +26,7 @@ # See: https://docs.ixpmanager.org/latest/grapher/smokeping/ KEY="my-ixp-manager-api-key" -URL="https://ixp.example.com/api/v4/grapher/config?backend=smokeping" +URL="https://ixp.example.com/admin/api/v4/grapher/config?backend=smokeping" ETCPATH="/etc/smokeping" SMOKEPING="/usr/bin/smokeping" SMOKEPING_RELOAD="/etc/rc.d/smokeping reload" diff --git a/tools/runtime/tacacs/update-tacacs.sh b/tools/runtime/tacacs/update-tacacs.sh index abf7c161b..5554a0a5e 100755 --- a/tools/runtime/tacacs/update-tacacs.sh +++ b/tools/runtime/tacacs/update-tacacs.sh @@ -29,7 +29,7 @@ DEST="/usr/local/etc/tac_plus.conf" KEY="your-ixp-manager-api-key" -URL="https://ixp.example.com/api/v4/user/formatted" +URL="https://ixp.example.com/admin/api/v4/user/formatted" USERS="alice,joe,mike,mary" # paths to utilities / init.d scripts diff --git a/tools/vagrant/scripts/ixpm-reconfigure-routers-bird2.sh b/tools/vagrant/scripts/ixpm-reconfigure-routers-bird2.sh index 8406a644e..17ca63b30 100755 --- a/tools/vagrant/scripts/ixpm-reconfigure-routers-bird2.sh +++ b/tools/vagrant/scripts/ixpm-reconfigure-routers-bird2.sh @@ -40,10 +40,10 @@ ALLOWED_HANDLES="as112-vix1-ipv4 as112-vix1-ipv6 as112-vix2-ipv4 as112-vix2-ipv6 # --- the following should be fine on a typical Debian / Ubuntu system: -URL_LOCK="${URLROOT}/api/v4/router/get-update-lock" -URL_CONF="${URLROOT}/api/v4/router/gen-config" -URL_RELEASE="${URLROOT}/api/v4/router/release-update-lock" -URL_DONE="${URLROOT}/api/v4/router/updated" +URL_LOCK="${URLROOT}/admin/api/v4/router/get-update-lock" +URL_CONF="${URLROOT}/admin/api/v4/router/gen-config" +URL_RELEASE="${URLROOT}/admin/api/v4/router/release-update-lock" +URL_DONE="${URLROOT}/admin/api/v4/router/updated" BIRDBIN="/usr/sbin/bird" ETCPATH="/usr/local/etc/bird" diff --git a/tools/vagrant/scripts/rc-reconfigure.sh b/tools/vagrant/scripts/rc-reconfigure.sh index 10733b069..e880bcc60 100755 --- a/tools/vagrant/scripts/rc-reconfigure.sh +++ b/tools/vagrant/scripts/rc-reconfigure.sh @@ -39,9 +39,9 @@ BIRDBIN="/usr/sbin/bird" # --- the following should be fine on a typical Debian / Ubuntu system: -URL_LOCK="${URLROOT}/api/v4/router/get-update-lock" -URL_CONF="${URLROOT}/api/v4/router/gen-config" -URL_DONE="${URLROOT}/api/v4/router/updated" +URL_LOCK="${URLROOT}/admin/api/v4/router/get-update-lock" +URL_CONF="${URLROOT}/admin/api/v4/router/gen-config" +URL_DONE="${URLROOT}/admin/api/v4/router/updated" ETCPATH="/usr/local/etc/bird" RUNPATH="/var/run/bird" diff --git a/tools/vagrant/scripts/rs-api-reconfigure.sh b/tools/vagrant/scripts/rs-api-reconfigure.sh index 08b2fe616..1dd920fd9 100755 --- a/tools/vagrant/scripts/rs-api-reconfigure.sh +++ b/tools/vagrant/scripts/rs-api-reconfigure.sh @@ -38,9 +38,9 @@ BIRDBIN="/usr/sbin/bird" # --- the following should be fine on a typical Debian / Ubuntu system: -URL_LOCK="${URLROOT}/api/v4/router/get-update-lock" -URL_CONF="${URLROOT}/api/v4/router/gen-config" -URL_DONE="${URLROOT}/api/v4/router/updated" +URL_LOCK="${URLROOT}/admin/api/v4/router/get-update-lock" +URL_CONF="${URLROOT}/admin/api/v4/router/gen-config" +URL_DONE="${URLROOT}/admin/api/v4/router/updated" ETCPATH="/usr/local/etc/bird" RUNPATH="/var/run/bird"