{"id":17569022,"url":"https://github.com/riywo/site-status","last_synced_at":"2025-03-29T14:22:20.914Z","repository":{"id":57361978,"uuid":"12423386","full_name":"riywo/site-status","owner":"riywo","description":"Ping web sites and get status","archived":false,"fork":false,"pushed_at":"2013-08-28T05:51:07.000Z","size":148,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T03:08:31.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","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/riywo.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}},"created_at":"2013-08-28T03:09:02.000Z","updated_at":"2014-03-17T18:49:58.000Z","dependencies_parsed_at":"2022-09-26T16:40:53.515Z","dependency_job_id":null,"html_url":"https://github.com/riywo/site-status","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riywo%2Fsite-status","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riywo%2Fsite-status/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riywo%2Fsite-status/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riywo%2Fsite-status/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riywo","download_url":"https://codeload.github.com/riywo/site-status/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246193624,"owners_count":20738524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-21T17:08:42.510Z","updated_at":"2025-03-29T14:22:20.893Z","avatar_url":"https://github.com/riywo.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# site-status\n\nPing web sites and get status\n\n## What is this?\n\nLike [pingdom](https://www.pingdom.com/) or [keynote](http://www.keynote.com/), `site-status` access some endpoints of web sites and gets the \"Site Status\".\n\nExample:\n\n    $ cat ./example/github.json\n    { \"site\": \"github\", \"url\": \"https://status.github.com/\", \"stats\": { \"GitHub\": { \"selector\": \"div.service:nth-of-type(1) span.status\", \"type\": \"string\" } , \"App Server %\": { \"selector\": \"div.graph div.data:nth-of-type(1) span.number\", \"type\": \"numeric\" } } }\n\n    $ cat ./example/github.json | site-status\n    {\"site\":\"github\",\"url\":\"https://status.github.com/\",\"time\":1100,\"code\":\"200\",\"stats\":{\"GitHub\":\"Normal\",\"App Server %\":100}}\n\n## \"Site Status\"?\n\n### status code\n\nHTTP status code.\n\n### response time\n\nResponse time of the HTTP request.\n\n### in the content\n\nSome sites have \"status\" value in their contents of the sites. `site-status` can scrape the value.\n\n**Currently only HTML and CSS selector.** JSONPath will be supported soon.\n\n## Installation\n\n    npm install -g site-status\n\n## Usage\n\n`site-status` reads STDIN line by line as a site configuration JSON object, get the sites and writes STDOUT line by line as a site status.\n\n### site configuration (STDIN)\n\n#### site\n\nName of the site\n\n#### url\n\nURL of the site endpoint\n\n#### stats\n\n- key: name of the stat\n- value:\n    - selector: CSS selector\n        - see also: [CSSselect](https://npmjs.org/package/CSSselect)\n    - type: `numeric` or `string`\n\n#### example\n\nYou have to use a single line JSON.\n\n    { \"site\": \"github\", \"url\": \"https://status.github.com/\", \"stats\": { \"GitHub\": { \"selector\": \"div.service:nth-of-type(1) span.status\", \"type\": \"string\" } , \"App Server %\": { \"selector\": \"div.graph div.data:nth-of-type(1) span.number\", \"type\": \"numeric\" } } }\n\npretty print:\n\n    {\n        \"site\": \"github\",\n        \"url\": \"https://status.github.com/\",\n        \"stats\": {\n            \"App Server %\": {\n                \"selector\": \"div.graph div.data:nth-of-type(1) span.number\",\n                \"type\": \"numeric\"\n            },\n            \"GitHub\": {\n                \"selector\": \"div.service:nth-of-type(1) span.status\",\n                \"type\": \"string\"\n            }\n        }\n    }\n\n### site status (STDOUT)\n\n#### site\n\nSame as the site configuration\n\n#### url\n\nSame as the site configuration\n\n#### code\n\nHTTP status code (200, 400, 500 or ***)\n\n#### time\n\nResponse time (ms)\n\n#### stats\n\nScraped status\n\n#### example\n\n    {\"site\":\"github\",\"url\":\"https://status.github.com/\",\"time\":912,\"code\":\"200\",\"stats\":{\"GitHub\":\"Normal\",\"App Server %\":100}}\n\npretty print:\n\n    {\n        \"site\": \"github\",\n        \"url\": \"https://status.github.com/\",\n        \"code\": \"200\",\n        \"time\": 912,\n        \"stats\": {\n            \"App Server %\": 100,\n            \"GitHub\": \"Normal\"\n        }\n    }\n\n### help\n\n      Usage: site-status [options]\n    \n      Options:\n    \n        -h, --help         output usage information\n        -V, --version      output the version number\n        -t, --timeout \u003cn\u003e  Timeout (ms) default: 10000\n\n## License\n\nMIT\n\n## Author\n\nRyosuke IWANAGA a.k.a. riywo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friywo%2Fsite-status","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friywo%2Fsite-status","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friywo%2Fsite-status/lists"}