{"id":19449063,"url":"https://github.com/skywarth/openai-api-status-prober","last_synced_at":"2026-03-06T13:04:08.685Z","repository":{"id":206308907,"uuid":"716329586","full_name":"skywarth/openai-api-status-prober","owner":"skywarth","description":"Prometheus prober/exporter for OpenAI API for fetching status","archived":false,"fork":false,"pushed_at":"2025-08-10T22:42:21.000Z","size":115,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-06T13:44:22.078Z","etag":null,"topics":["api-status","blackbox-exporter","grafana","openai","openai-api","openai-status","probe","prober","prometheus","prometheus-server","status"],"latest_commit_sha":null,"homepage":"https://openai-api-status-prober.onrender.com/open-ai-status-prober/simplified_status","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skywarth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-08T22:59:13.000Z","updated_at":"2025-08-10T22:42:24.000Z","dependencies_parsed_at":"2023-11-16T00:25:26.530Z","dependency_job_id":"b0a13e3a-0404-418f-b7d3-6a10eb390dad","html_url":"https://github.com/skywarth/openai-api-status-prober","commit_stats":null,"previous_names":["skywarth/openai-api-status-prober"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skywarth/openai-api-status-prober","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skywarth%2Fopenai-api-status-prober","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skywarth%2Fopenai-api-status-prober/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skywarth%2Fopenai-api-status-prober/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skywarth%2Fopenai-api-status-prober/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skywarth","download_url":"https://codeload.github.com/skywarth/openai-api-status-prober/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skywarth%2Fopenai-api-status-prober/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30178286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T12:39:21.703Z","status":"ssl_error","status_checked_at":"2026-03-06T12:36:09.819Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-status","blackbox-exporter","grafana","openai","openai-api","openai-status","probe","prober","prometheus","prometheus-server","status"],"created_at":"2024-11-10T16:29:52.916Z","updated_at":"2026-03-06T13:04:08.667Z","avatar_url":"https://github.com/skywarth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI API Status Prober\n\n[![npm version](https://badge.fury.io/js/openai-api-status-prober.svg)](https://badge.fury.io/js/openai-api-status-prober)\n![npm](https://img.shields.io/npm/dt/openai-api-status-prober)\n\n\n\nThis is a simple web service that you can use to probe openAI API status and integrate it into your prometheus server.\n\nSee it in action:\nhttps://openai-api-status-prober.onrender.com/open-ai-status-prober/simplified_status\n\n![Prometheus Server Dashboard Target](img/prometheus.png)\n![Grafana Blackbox exporter Dashboard](img/grafana.png)\n\n\n## Table of Contents\n\n- [Why](#why)\n- [Installation](#installation)\n- [Integrating into Prometheus Server](#integrating-into-prometheus-server)\n- [CLI Commands](#cli-commands)\n\n## Why?\n\nBecause the [official API](https://status.openai.com/api/v2) for probing/fetching the API status of the openAI returns HTTP code 200 whether it's down or up. But for Prometheus Blackbox exporter, you need an endpoint that can return 200/500/3xx depending on the status.\n\nThis little prober works as a proxy for the actual [openAI API status](https://status.openai.com/api/v2) and translates its response to corresponding HTTP response status codes, this way you can easily integrate openAI as a target for your Prometheus Blackbox exporter.\n\n\n\n## Installation\n\n\nThere is three different methods as to consume this API.\n1. [Global installation (TL;DR get it working ASAP)](#global-installation)\n2. [Local Installation](#2-local-installation)\n3. [Use production deployment directly (please don't overload)](#use-production-deployment-directly)\n\nFollowing the installation, move on with [integrating it into your Prometheus](#integrating-into-prometheus-server).\n\n\u003ca name=\"global-installation\"\u003e\u003c/a\u003e\n### 1. Global installation (TL;DR get it working ASAP)\n\n0. Install `pm2`, this method relies on [PM2](https://pm2.keymetrics.io/) to start and keep itself running.\n\n```bash\nnpm install -g pm2\n```\n\n1. Install the package **globally**\n\n```bash\nnpm install -g openai-api-status-prober\n```\n\n2. Start the service\n\nServe it via `pm2`:\n```bash\nopenai-api-status-prober start\n```\n\nSet `pm2` as a system service (if you haven't already):\n```bash\npm2 startup\n```\n\nSave `pm2` configuration and jobs\n```bash\npm2 save\n```\n\n3. Enjoy\n\nYou may access the API via default port (9091) and default endpoint (/open-ai-status-prober/simplified_status). For your local, that would be: \n\nhttp://localhost:9091/open-ai-status-prober/simplified_status\n\n---\n\n### 2. Local Installation\n\n0. Clone or download the repository\n\n```bash\ngit clone https://github.com/skywarth/openai-api-status-prober.git\n```\n\n```\ncd openai-api-status-prober\n```\n\n1. Install the dependencies\n\n`npm ci` or `npm install`\n\n2. (Optionally) Configure environment\n\n`cp .env.example .env`\n\nThen change the port and the endpoint as you wish.\n\n3. Run the server\n\n```bash\nnode src/server.js` \n```\n\n\u003ca name=\"use-production-deployment-directly\"\u003e\u003c/a\u003e\n### 3. Use production deployment directly\n\nYou may hook up the deployment on https://openai-api-status-prober.onrender.com/open-ai-status-prober/simplified_status directly if you wish. \nBut don't do this unless it is imperative, or you're simply not able to self-host.\n\n\n## Integrating into Prometheus Server\n\nAfter you're through with the [installation](#installation), you may proceed with integrating it into your prometheus job as a probing target.\n\nDetermine the serving point of this server, if you didn't customize the env that would be:\n\u003e http://127.0.0.1:9091/open-ai-status-prober/simplified_status\n\nPrometheus Blackbox Exporter expects a URL for each probing target. Therefore, directly hook this server's endpoint URL as blackbox exporter target.\n\n*Tip: you may find your prometheus config at `/etc/prometheus/prometheus.yml`*\n\n```yaml\n#other jobs and configs...\nscrape_configs:\n  - job_name: 'blackbox'\n    metrics_path: /probe\n    params:\n      module: [http_2xx]  # Look for an HTTP 200 response.\n    static_configs:\n      - targets:\n        - http://prometheus.io \n        - https://some-other-target-of-yours.io\n        - http://127.0.0.1:9091/open-ai-status-prober/simplified_status # Focus here, this is your OpenAI Status integration point\n    relabel_configs:\n      - source_labels: [__address__]\n        target_label: __param_target\n      - source_labels: [__param_target]\n        target_label: instance\n      - target_label: __address__\n        replacement: 127.0.0.1:9115  # The blackbox exporter's real hostname:port.\n  - job_name: 'blackbox_exporter'  # collect blackbox exporter's operational metrics.\n    static_configs:\n      - targets: ['127.0.0.1:9115']\n#other jobs and configs...\n```\n\nIn the configuration above, we've only added our OpenAI API Status prober into the targets, no other change is necessary.\n\nTo reload your Prometheus configuration, simply restart the Prometheus service.\nUse `sudo` if necessary. (This method may vary depending on the system and prometheus installation.)\n\n```bash\n$ systemctl restart prometheus \n```\n\nNavigate to the prometheus server dashboard and see your new target getting probed. Cheers!\n\n### Delving deeper into probe targets\n\nSince this new target of yours for the OpenAI API status is served and probed via a `localhost` or a local IP address, this may look ugly on your Grafana Dashboard when you pair it with Prometheus Server.\n\nTo overcome this pickle, you may relabel your Prometheus Blackbox exporter targets to display proper labels in your Grafana Dashboard. Although application method for this may vary, here's how I usually do it:\n\n```yaml\n# rest of the Prometheus configuration\n- job_name: 'blackbox'\n    metrics_path: /probe\n    params:\n      module: [http_2xx]\n    static_configs:\n      - targets:\n        - http://127.0.0.1:9091/open-ai-status-prober/simplified_status\n        labels:\n          instance: 'OpenAI API'\n      - targets:\n        - https://github.com\n        labels:\n          instance: 'Github'\n    relabel_configs:\n      - source_labels: [__address__]\n        target_label: __param_target\n      - target_label: __address__\n        replacement: 127.0.0.1:9115  # Blackbox Exporter's address\n# rest of the Prometheus configuration\n```\n\nSee the difference? We introduced a new label `instance` for each target which allows us to utilize it for the display purposes.\nThis way our Grafana Dashboard would effectively display the labels we've designated rather than the addresses of each target.\n\n\n### A word on Grafana Dashboard\n\nPersonally, I find this Grafana Dashboard setup to be rather enjoyable, so I can suggest it:\nhttps://grafana.com/grafana/dashboards/13659-blackbox-exporter-http-prober/\n\nThe `prometheus.yml` configuration I've provided above also fits nicely for this dashboard.\n\n\n## CLI commands\n\nThis small app comes packed with some cli commands. These commands are tailored for global installation. Here's the list:\n\n### Start server\n\nStarts the express.js server via `pm2`, also saves the current PM2 config by issuing `pm2 save`\n\n`openai-api-status-prober start`\n\n### Stop server\n\nStop the server, and save the current state of PM2. Keeps the current tab/job in the PM2, only stops it.\n\n`openai-api-status-prober stop`\n\n\n### Remove server\n\nRemove the server from PM2 job configuration and save the current PM2 config. \n\nUse this if you would like to remove the running job/thread for the app\n\n`openai-api-status-prober detach`\n\n\n### Version\n\nOutputs package version\n\n`openai-api-status-prober -v` or `openai-api-status-prober --version`\n\n### Env path\n\nOutputs the env path for the package\n\n`openai-api-status-prober env-path`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskywarth%2Fopenai-api-status-prober","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskywarth%2Fopenai-api-status-prober","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskywarth%2Fopenai-api-status-prober/lists"}