{"id":16921702,"url":"https://github.com/strrl/mini-node-exporter","last_synced_at":"2025-03-20T23:27:54.971Z","repository":{"id":110578143,"uuid":"399761273","full_name":"STRRL/mini-node-exporter","owner":"STRRL","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-25T09:28:04.000Z","size":3,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T08:46:07.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/STRRL.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-08-25T09:24:17.000Z","updated_at":"2022-01-26T16:56:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"34c32892-1223-478b-ac3e-24e67da4205a","html_url":"https://github.com/STRRL/mini-node-exporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STRRL%2Fmini-node-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STRRL%2Fmini-node-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STRRL%2Fmini-node-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STRRL%2Fmini-node-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/STRRL","download_url":"https://codeload.github.com/STRRL/mini-node-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244708507,"owners_count":20496902,"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-13T19:52:54.327Z","updated_at":"2025-03-20T23:27:54.950Z","avatar_url":"https://github.com/STRRL.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# mini-node-exporter\n\nHi, mini-node-exporter is a project as the interview for [mentorship program of Chaos Mesh on LFX Mentorship 2021 fall](https://mentorship.lfx.linuxfoundation.org/project/8db683b0-0273-4a83-9ed9-4c33ee2cfcf0).\n\nYou could upload your codes via GitHub(or other platform), and email me(strruiling@gmail.com) the repo link. Or just email me the codes by `tar` or `zip` pack.\n\nPlease finish this project before [Mon, August 30, 2021 12:00 +8:00](https://time.is/compare/1200_30_Aug_2021_in_Shanghai).\n\n## Overview\n\nFirst of all, we do not restrict the programing language and frameworks, use any tech stack as your wish.\n\nBuild, and run an application on **linux**, it could expose several metrics of the host. Then use the prometheus to scrape this exporter, and draw a dashboard on grafana.\n\nThere are two goals of this small project:\n\n1. build a web application that exposes several metrics \n1. collect and make a dashboard for the exposed metrics\n\n### Goal 1\n\nBuild one web application called `mini-node-exporter`, it should listen on `0.0.0.0:23333`, and expose several endpoints:\n\n- `/info/hostname` show the hostname with plain text\n- `/info/uptime` show the uptime of the system in seconds with plain text\n- `/info/load` show the load average in 1m, 5m and 15m with JSON, example `{\"1m\": 0.57, \"5m\":0.80, \"15m\":0.77}`\n- `/metrics` expose metrics that could be scraped by prometheus\n\nRequired metrics that should be exposed in `/metrics`:\n\n- `node_load`: load average, with a label for three duraion, for example:\n- `node_uptime`: uptime of the system in seconds\n\nexample:\n\n```\n# TYPE node_load gauge\nnode_load{duration=\"1m\"} 0.57\nnode_load{duration=\"5m\"} 0.80\nnode_load{duration=\"15m\"} 0.77\n# TYPE node_uptime gauge\nnode_uptime 9246.58\n```\n\noptional bonus:\n\n- build a docker image for the application, publish it on DockerHub, and provide the `Dockerfile` in the repo\n\n### Goal 2\n\nStartup the monitoring stack of prometheus and grafana, and show these metrics on a grafana dashboard.\n\nYou should:\n\n- execute `mini-node-exporter` on your host\n- execute prometheus on your host, and configure it for collecting metrics from `mini-node-exporter`\n- execute grafana on your host, and configure it for using prometheus as the datasource\n- create a grafana dashboard for showing these metrics provided by `mini-node-exporter`, in any forms.\n\nPlease let it collector data for several minutes and take a screenshot of your grafana dashboard, email me the screenshot. :P\n\noptional bonus:\n\n- orcherating the monitroing stack and `mini-node-exporter` application by docker-compose/vagrant/kubernetes or any other forms, provides the manifest files in the repo\n\n## References\n\nsome information that might be helpful:\n\n- https://prometheus.io/docs/prometheus/latest/getting_started/\n- https://prometheus.io/docs/prometheus/latest/configuration/configuration/\n- https://prometheus.io/docs/instrumenting/clientlibs/\n- https://man7.org/linux/man-pages/man5/proc.5.html\n\n## Other\n\nHappy Coding!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrrl%2Fmini-node-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrrl%2Fmini-node-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrrl%2Fmini-node-exporter/lists"}