TheoBrigitte / kimsufi-notifier

Script to notify about OVH Eco and Kimsufi servers availability via Telegram and/or OpsGenie
https://t.me/KimsufiNotifierBot
MIT License
37 stars 11 forks source link

Failed to fetch data from ... #12

Open a20eac1d opened 13 hours ago

a20eac1d commented 13 hours ago

Running this script in version aea563c on Debian 12 will produce an error.

bin/list.sh --country FR --category kimsufi fetching servers in FR fetching data from https://eu.api.ovh.com/v1/order/catalog/public/eco?ovhSubsidiary=FR saved data to kimsufi-notifier.jmpwgp failed to fetch data from https://eu.api.ovh.com/v1/order/catalog/public/eco?ovhSubsidiary=FR

Manually opening the "kimsufi-notifier.jmpwgp" file reveals that the data has actually been downloaded correctly:

{ "catalogId": 7725, "locale": { "currencyCode": "EUR", "subsidiary": "FR", "taxRate": 20 }, "plans": [ { "planCode": "24rise06-sgp", "invoiceName": "RISE-6 | Intel Xeon Gold 6312U", "addonFamilies": [ { "name": "memory", "exclusive": true, "mandatory": true, "addons": [ "ram-128g-ecc-3200-24rise", "ram-512g-ecc-3200-24rise", "ram-256g-ecc-3200-24rise", "ram-1024g-ecc-3200-24rise" ], "default": "ram-128g-ecc-3200-24rise" }, [...]

The script seems to recognize this valid response as invalid and will crash with the error message above.

Another example:

bin/check.sh --plan-code 24sk50

checking 24sk50 availability in fr,gra,rbx,sbg datacenter(s) fetching data from https://eu.api.ovh.com/v1/dedicated/server/datacenter/availabilities?planCode=24sk50&datacenters=fr,gra,rbx,sbg [{"fqn":"24sk50.ram-32g-ecc-2400.softraid-2x2000sa","memory":"ram-32g-ecc-2400","planCode":"24sk50","server":"24sk50","storage":"softraid-2x2000sa","datacenters":[{"availability":"1H-high","datacenter":"gra"},{"availability":"1H-high","datacenter":"rbx"},{"availability":"1H-high","datacenter":"sbg"}]},{"fqn":"24sk50.ram-32g-ecc-2400.softraid-2x450nvme","memory":"ram-32g-ecc-2400","planCode":"24sk50","server":"24sk50","storage":"softraid-2x450nvme","datacenters":[{"availability":"1H-low","datacenter":"gra"},{"availability":"1H-low","datacenter":"rbx"},{"availability":"unavailable","datacenter":"sbg"}]},{"fqn":"24sk50.ram-64g-ecc-2400.softraid-2x2000sa","memory":"ram-64g-ecc-2400","planCode":"24sk50","server":"24sk50","storage":"softraid-2x2000sa","datacenters":[{"availability":"1H-high","datacenter":"gra"},{"availability":"1H-high","datacenter":"rbx"},{"availability":"1H-low","datacenter":"sbg"}]},{"fqn":"24sk50.ram-64g-ecc-2400.softraid-2x450nvme","memory":"ram-64g-ecc-2400","planCode":"24sk50","server":"24sk50","storage":"softraid-2x450nvme","datacenters":[{"availability":"unavailable","datacenter":"gra"},{"availability":"1H-low","datacenter":"rbx"},{"availability":"unavailable","datacenter":"sbg"}]}] saved data to kimsufi-notifier.cnr1Ig failed to fetch data from https://eu.api.ovh.com/v1/dedicated/server/datacenter/availabilities?planCode=24sk50&datacenters=fr,gra,rbx,sbg

annaparker commented 7 hours ago

Your IP looks banned by OVH.