You are not logged in.

#1 2025-08-28 16:53:44

grain_collector
Member
Registered: 2022-06-06
Posts: 4

I want to build a tool for getting uptime from status.archlinux.org

I want to make a tool that can query status.archlinux.org for AUR, Forum, Website, and Wiki uptime numbers in a format that can be incorporated into other tools (e.g. a bumblebee-status script that displays these numbers in a status bar). However, I don't know who made the site (so I can their permission for building such a tool/see if an API exists already or if it'd need to be scraped), nor how to query the API for these numbers, and wanted to ask the community for some help.

(Just being able to retrieve the values with a curl/wget request may be enough.)

Last edited by grain_collector (2025-08-28 17:03:29)

Offline

#2 2025-08-28 17:08:21

gromit
Administrator
From: Germany
Registered: 2024-02-10
Posts: 1,312
Website

Re: I want to build a tool for getting uptime from status.archlinux.org

The site is hosted by uptimerobot, if you manage to interface with them sure big_smile They have an API, but it's intended to be used by us (their customer) as far as I understand ..

Offline

#3 2025-08-29 02:39:03

grain_collector
Member
Registered: 2022-06-06
Posts: 4

Re: I want to build a tool for getting uptime from status.archlinux.org

Hmmm I see. It may be worth putting a little effort into trying to interface, though I don't think my chances will be so good. Thanks for letting me know mate.

Offline

#4 2025-08-29 06:07:02

mithrial
Member
Registered: 2017-03-05
Posts: 112

Re: I want to build a tool for getting uptime from status.archlinux.org

The website queries the following API:

https://status.archlinux.org/api/getMonitorList/vmM5ruWEAB

The endpoint does not seem to be random, however, it looks like it, right?

Offline

#5 2025-08-30 15:17:06

teckk
Member
Registered: 2013-02-21
Posts: 542

Re: I want to build a tool for getting uptime from status.archlinux.org

I did:

url="https://status.archlinux.org/api/getMonitorList/vmM5ruWEAB?page=1&_=1756566521375"

agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0"

curl -A "$agent" "$url" -o arch_uptime.html

jq . arch_uptime.html | less
{
  "status": "ok",
  "psp": {
    "perPage": 30,
    "totalMonitors": 4,
    "monitors": [
      {
        "monitorId": 788139639,
        "createdAt": 1621009630,
        "statusClass": "success",
        "name": "AUR",
        "url": null,
        "type": "HTTP(s)",
        "groupId": 0,
        "groupName": "Monitors (default)",
        "dailyRatios": [
          {
            "ratio": "43.246",
            "label": "warning"
          },
          {
            "ratio": "75.251",
            "label": "warning"
...

Last edited by teckk (2025-08-30 15:17:39)

Offline

#6 2025-08-31 01:34:02

Succulent of your garden
Member
From: Majestic kingdom of pot plants
Registered: 2024-02-29
Posts: 855

Re: I want to build a tool for getting uptime from status.archlinux.org

teckk wrote:

I did:

url="https://status.archlinux.org/api/getMonitorList/vmM5ruWEAB?page=1&_=1756566521375"

agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0"

curl -A "$agent" "$url" -o arch_uptime.html

jq . arch_uptime.html | less
{
  "status": "ok",
  "psp": {
    "perPage": 30,
    "totalMonitors": 4,
    "monitors": [
      {
        "monitorId": 788139639,
        "createdAt": 1621009630,
        "statusClass": "success",
        "name": "AUR",
        "url": null,
        "type": "HTTP(s)",
        "groupId": 0,
        "groupName": "Monitors (default)",
        "dailyRatios": [
          {
            "ratio": "43.246",
            "label": "warning"
          },
          {
            "ratio": "75.251",
            "label": "warning"
...

So are you able to fetch all the status of the services of arch Linux with that ? Seems that statusClass attribute shows the current status, in this case AUR, but I'm not totally sure, I haven't tried your script yet. But if that's the case then you could just extract the data of the json using the jq command with more flags, then probably you can redirect that using awk to start making the end presentation tongue

EDIT: I don't have time to do that, but this utility could be very useful smile

Last edited by Succulent of your garden (2025-08-31 01:34:33)


str( @soyg ) == str( @potplant ) btw!

Offline

#7 2025-09-03 11:43:29

grain_collector
Member
Registered: 2022-06-06
Posts: 4

Re: I want to build a tool for getting uptime from status.archlinux.org

teckk wrote:

I did:

url="https://status.archlinux.org/api/getMonitorList/vmM5ruWEAB?page=1&_=1756566521375"

agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0"

curl -A "$agent" "$url" -o arch_uptime.html

jq . arch_uptime.html | less
{
  "status": "ok",
  "psp": {
    "perPage": 30,
    "totalMonitors": 4,
    "monitors": [
      {
        "monitorId": 788139639,
        "createdAt": 1621009630,
        "statusClass": "success",
        "name": "AUR",
        "url": null,
        "type": "HTTP(s)",
        "groupId": 0,
        "groupName": "Monitors (default)",
        "dailyRatios": [
          {
            "ratio": "43.246",
            "label": "warning"
          },
          {
            "ratio": "75.251",
            "label": "warning"
...

You are my hero!

Offline

Board footer

Powered by FluxBB