{"id":20419474,"url":"https://github.com/risingstack/kubernetes-prometheus-nodejs","last_synced_at":"2025-09-24T06:32:07.839Z","repository":{"id":80615642,"uuid":"186983621","full_name":"RisingStack/kubernetes-prometheus-nodejs","owner":"RisingStack","description":"Monitoring with prometheus example","archived":false,"fork":false,"pushed_at":"2019-08-10T08:50:53.000Z","size":143,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-06T10:06:52.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/RisingStack.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":"2019-05-16T08:17:10.000Z","updated_at":"2024-10-19T12:02:59.000Z","dependencies_parsed_at":"2023-07-08T02:45:49.331Z","dependency_job_id":null,"html_url":"https://github.com/RisingStack/kubernetes-prometheus-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RisingStack/kubernetes-prometheus-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RisingStack%2Fkubernetes-prometheus-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RisingStack%2Fkubernetes-prometheus-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RisingStack%2Fkubernetes-prometheus-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RisingStack%2Fkubernetes-prometheus-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RisingStack","download_url":"https://codeload.github.com/RisingStack/kubernetes-prometheus-nodejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RisingStack%2Fkubernetes-prometheus-nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276707582,"owners_count":25690052,"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","status":"online","status_checked_at":"2025-09-24T02:00:09.776Z","response_time":97,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-15T06:37:13.827Z","updated_at":"2025-09-24T06:32:07.817Z","avatar_url":"https://github.com/RisingStack.png","language":"JavaScript","readme":"# Commands:\n\nReplace the auto-generated resource names in the example with actual ones.\nCheck `kubectl get [pods|services|deployments]`\n\n```sh\n# install helm\nkubectl apply -f rbac-helm-config.yml\n# init helm\nhelm init --service-account tiller --history-max 200\n# install prometheus with helm\nhelm install stable/prometheus-operator\n\ncat alertmanager.yaml | base64 | pbcopy\n# replace alertmanager secret to send messages to slack with a custom template\nkubectl edit secret alertmanager-sad-wolf-prometheus-operat-alertmanager\n\n# create sample microservice services\nkubectl create -f info-service.yml users-service.yml api-gateway-service.yml\nkubectl create -f info-app-deployment.yml users-app-deployment.yml api-gateway-app-deployment.yml\n\n# port-forwards to access prometheus, grafana, alertmanager\nkubectl port-forward svc/sad-wolf-prometheus-operat-prometheus 9090:9090\nkubectl port-forward svc/sad-wolf-grafana 8080:80\nkubectl port-forward svc/sad-wolf-prometheus-operat-alertmanager 9093:9093\nkubectl port-forward svc/api-gateway 3000:80\n\n# put some load on the service\nab -t 500 -c 100 -H \"Authorization: s4mpl3t0k3n\" localhost:3000/api/v1/info\n\n```\n\n# To run on localhost\n\nFollow the instructions in the previous block, but before creating services, do the following:\n\n```sh\neval $(minikube docker-env)\ndocker build -t YOUR_IMAGE_NAME:v1 ./microservices-example/SERVICE_NAME\n```\n\nEdit your `*-app-deployment.yaml` files according to the image names you used, then use `kubectl create -f FILENAME` to create deployments\n\nTo get the default admin password for grafana run\n```sh\nkubectl get secret NAME_OF_YOUR_GRAFANA -o jsonpath=\"{.data.admin-password}\" | base64 --decode ; echo\n```\n\n# Example requests:\n\n```sh\ncurl --header \"Content-Type: application/json\" \\\n  --request POST \\\n  --data '{\"username\":\"Eve\",\"password\":\"Eve\"}' \\\n  http://localhost:3000/api/v1/login\ncurl -X POST localhost:3000/api/v1/login\ncurl -H \"Authorization: s4mpl3t0k3n\" localhost:3000/api/v1/info\ncurl localhost:3000/api/v1/info\ncurl -H \"Authorization: s4mpl3t0k3n\" localhost:3000/api/v1/users\ncurl localhost:3000/api/v1/users\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frisingstack%2Fkubernetes-prometheus-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frisingstack%2Fkubernetes-prometheus-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frisingstack%2Fkubernetes-prometheus-nodejs/lists"}