{"id":20021347,"url":"https://github.com/piotrpdev/webmon","last_synced_at":"2025-09-20T04:32:16.231Z","repository":{"id":177640451,"uuid":"659825241","full_name":"piotrpdev/webmon","owner":"piotrpdev","description":"Testing out Kafka on OpenShift by making a website uptime tracker.","archived":true,"fork":false,"pushed_at":"2023-07-05T13:11:43.000Z","size":532,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T03:42:27.764Z","etag":null,"topics":["amq-streams","kafka","kotlin","openshift","python"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/piotrpdev.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":"2023-06-28T16:32:11.000Z","updated_at":"2025-01-04T19:33:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"3283ec1b-4a91-4de0-8763-08399168fb4c","html_url":"https://github.com/piotrpdev/webmon","commit_stats":null,"previous_names":["piotrpdev/webmon"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/piotrpdev/webmon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrpdev%2Fwebmon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrpdev%2Fwebmon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrpdev%2Fwebmon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrpdev%2Fwebmon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piotrpdev","download_url":"https://codeload.github.com/piotrpdev/webmon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrpdev%2Fwebmon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276046891,"owners_count":25575876,"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-20T02:00:10.207Z","response_time":63,"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":["amq-streams","kafka","kotlin","openshift","python"],"created_at":"2024-11-13T08:36:31.378Z","updated_at":"2025-09-20T04:32:15.936Z","avatar_url":"https://github.com/piotrpdev.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"![example](.github/img/example2.png)\n\n# Webmon\n\nTesting out Kafka on OpenShift by making a website uptime tracker.\n\n## Pre-requisites\n\n### Create test websites\n\u003e This assumes you have a running OpenShift cluster and the `oc` command line tool installed.\n\nRun `./scripts/setup-httpd.sh`\n\n### Create 'website-status' topic\n\u003e This assumes you have [AMQ Streams](https://access.redhat.com/products/red-hat-amq/) or [Strimzi](https://developers.redhat.com/blog/2020/08/14/introduction-to-strimzi-apache-kafka-on-kubernetes-kubecon-europe-2020) running on your OpenShift cluster.\n\nRun `oc create -f ./scripts/website-status-topic.yaml`\n\n### Change Kafka config\nChange config details in `src/main/resources/kafka_config_example.yaml` to match your environment and rename the file to `kafka_config.yaml`.\n\n### Setup PostgreSQL database and Grafana\n\n\u003e Courtesy of [https://blog.devgenius.io/how-to-setup-grafana-with-postgresql-database-using-docker-compose-a-step-by-step-guide-e5a9cce90ba3](https://blog.devgenius.io/how-to-setup-grafana-with-postgresql-database-using-docker-compose-a-step-by-step-guide-e5a9cce90ba3)\n\n\u003e Default Grafana credentials: `admin:admin`\n\n```bash\ncd ./scripts/\nsudo docker-compose up -d\n```\n\n## Build\n\nRun the Gradle build task.\n\n## Usage\n\n### Start the producer\n\n```bash\n# Run this in the 'website-monitor' project\noc get routes -o yaml -o custom-columns=\":spec.host\" | xargs java -jar webmon-1.0-SNAPSHOT.jar produce\n```\n\n### Start the consumer\n```bash\n# Run this in the 'website-monitor' project\noc get routes -o yaml -o custom-columns=\":spec.host\" | xargs java -jar webmon-1.0-SNAPSHOT.jar consume\n```\n\n### Go to Grafana\n\nGo to `http://localhost:3001` and login with the default credentials.\n\n## Future considerations\n\n- [ ] Figure out how to efficiently use more than one partition\n- [ ] Make consumer code thread-safe\n- [ ] Instead of each url thread sending a message to Kafka, maybe have them push messages to an array and send in batches\n- [ ] Testing","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotrpdev%2Fwebmon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiotrpdev%2Fwebmon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotrpdev%2Fwebmon/lists"}