{"id":20072458,"url":"https://github.com/yashindane/monitoring-webapp","last_synced_at":"2025-06-20T17:11:26.356Z","repository":{"id":110974229,"uuid":"420379071","full_name":"YashIndane/monitoring-webapp","owner":"YashIndane","description":"Monitoring Web App build using FastAPI","archived":false,"fork":false,"pushed_at":"2022-12-12T10:08:05.000Z","size":1023,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-02T12:18:59.401Z","etag":null,"topics":["fastapi"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YashIndane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-23T10:18:41.000Z","updated_at":"2023-01-28T11:19:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"94d8f06d-6006-407f-9e35-6a05b02a4447","html_url":"https://github.com/YashIndane/monitoring-webapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YashIndane/monitoring-webapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashIndane%2Fmonitoring-webapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashIndane%2Fmonitoring-webapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashIndane%2Fmonitoring-webapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashIndane%2Fmonitoring-webapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YashIndane","download_url":"https://codeload.github.com/YashIndane/monitoring-webapp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashIndane%2Fmonitoring-webapp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260985197,"owners_count":23092888,"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":["fastapi"],"created_at":"2024-11-13T14:40:14.408Z","updated_at":"2025-06-20T17:11:21.338Z","avatar_url":"https://github.com/YashIndane.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://img.shields.io/badge/-FastAPI-grey?style=for-the-badge\u0026logo=fastapi) ![](https://img.shields.io/badge/-Python-grey?style=for-the-badge\u0026logo=python)\n\n![monitor](https://user-images.githubusercontent.com/53041219/207018446-d23043bd-7832-4157-8cd3-26bfa634fbc1.gif)\n\n[demo](https://www.linkedin.com/posts/yash-indane-aa6534179_fastapi-monitoring-softwaredevelopement-activity-6860459061431828480-HdIu)\n\n## Requirements\n\nRequirements are mentioned in [requirements.txt](https://github.com/YashIndane/monitoring-webapp/blob/main/requirements.txt), Install by -\n\n```\n$ pip3 install -r requirements.txt\n```\n\n## Running the App\n\nRun by -\n\n```\n$ uvicorn app:monitor_app --host 0.0.0.0 --port \u003cPORT\u003e --reload\n```\n\n## Configuration on System to be monitored\n\nInstall `httpd` and `sysstat` by -\n\n```\n$ yum install httpd sysstat\n```\n\nStart the httpd service by `$ systemctl start httpd`.\n\nHave this files in `/var/www/cgi-bin` directory -\n\nHave this lines of code at beginning of each file\n\n```py\n#!/usr/bin/python3\n\nfrom subprocess import getstatusoutput as gso\nimport cgi\n\nprint(\"content-type:text/plain\")\nprint(\"Access-Control-Allow-Origin: *\")\nprint()\n```\n\n`getfreemem.py`\n\n```py\nfree_mem = int(gso(\"free -m | grep 'Mem:' | awk '{ print $4 }'\")[1])\ntotal_mem = int(gso(\"free -m | grep 'Mem:' | awk '{ print $2 }'\")[1])\npercent_free = (free_mem * 100 ) / total_mem\nprint(percent_free)\n```\n\n`getreadspeed.py`\n\n```py\nread_speed = gso(\"iostat | grep sda | awk '{ print $3 }'\")[1]\nprint(read_speed)\n```\n\n`getwrspeed.py`\n\n```py\nwrite_speed = gso(\"iostat | grep sda | awk '{ print $4 }'\")[1]\nprint(write_speed)\n\n```\n\n`getcpuuse.py`\n\n```py\ncpu = gso(\"mpstat | grep all | awk '{ print $3 }'\")[1]\nprint(cpu)\n```\n\nMake above files executable by-\n\n```\n$ chmod +x \u003cFILE-NAME\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashindane%2Fmonitoring-webapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashindane%2Fmonitoring-webapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashindane%2Fmonitoring-webapp/lists"}