{"id":21867224,"url":"https://github.com/logchange/hofund-example","last_synced_at":"2026-05-19T06:32:46.556Z","repository":{"id":117723209,"uuid":"526847732","full_name":"logchange/hofund-example","owner":"logchange","description":"🗡️💥 Example repo to test and demonstrate hofund tool set 💥🗡️","archived":false,"fork":false,"pushed_at":"2023-03-09T18:24:47.000Z","size":43,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-26T16:13:42.162Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/logchange.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-20T06:41:13.000Z","updated_at":"2023-02-27T10:31:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"a62acff4-3255-4903-80d3-312b81a91e5b","html_url":"https://github.com/logchange/hofund-example","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/logchange%2Fhofund-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logchange%2Fhofund-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logchange%2Fhofund-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logchange%2Fhofund-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logchange","download_url":"https://codeload.github.com/logchange/hofund-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244871073,"owners_count":20523982,"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-11-28T05:08:44.922Z","updated_at":"2026-05-19T06:32:41.535Z","avatar_url":"https://github.com/logchange.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🗡️💥 hofund-example 💥🗡️\n\nThis project is used to demonstrate and test [**hofund**](https://github.com/logchange/hofund) - tool set to monitor \napplications, connections and discover current state of components of the system\n\n\n\n### Overview\n\nThis project contains following modules:\n\n- products\n- cart\n- payment\n- stats\n\n### Grafana Credentials\n\n- [Grafana](http://localhost:3000)\n\n- Login: admin\n- Password: foobar\n\n### Prometheus\n\n- [products](http://localhost:18081/actuator/prometheus)\n- [cart](http://localhost:18082/actuator/prometheus)\n- [payment](http://localhost:18083/actuator/prometheus)\n- [stats](http://localhost:18084/actuator/prometheus)\n\n\nNodes\n```\n\nsum(label_replace(label_replace(hofund_connection_status, \"title\", \"$1\", \"target\",\"(.+)\"), \"id\", \"$1\", \"title\", \"(.+)\")) without (source, target, instance, job, type) or\nsum(label_replace(label_replace(hofund_info_status, \"title\", \"$1\", \"application_name\",\"(.+)\"), \"subtitle\", \"$1\", \"application_version\", \"(.+)\")) without (application_name, application_version, instance, job)\n\n```\n\nEdges\n```\nsum(label_replace(hofund_connection_status, \"title\", \"$1\", \"target\",\"(.+)\")) without (source, target, instance, job, type)\n```\n\nnodes from last 7 days:\n```text\nsum(0 * sum_over_time(hofund_node[7d])) by (id, title, subtitle, type)\n```\n\n% of time when node was up\n```text\nsum(avg_over_time(( sum without() (hofund_info) or (0 * sum_over_time(hofund_info[7d])) )[7d:5m])) by (id)\n```\n\nCurrent state of nodes:\n```text\nsum(sum without() (hofund_info) or (0 * sum_over_time(hofund_info[7d]))) by (id)\n```\n\nSome interesting query for nodes with mainstat\n```txt\n(sum(0 * sum_over_time(hofund_node[7d])) by (id, title, subtitle, type)) * on (id) group_left(mainstat) (count_values without() (\"mainstat\", sum(avg_over_time(( sum without() (hofund_info) or (0 * sum_over_time(hofund_info[7d])) )[7d:5m])) by (id)))\n```\n\n\nAnd one more\n```\n\n      (sum by (id, title, subtitle, type) (0 * sum_over_time(hofund_node[1w])))\n    * on (id) group_left (mainstat)\n      (\n        count_values without () (\n          \"mainstat\",\n          sum by (id) (sum by (id) (sum without () (hofund_info) or (0 * sum_over_time(hofund_info[1w]))))\n        )\n      )\n  * on (id) group_left (secondarystat)\n    (\n      count_values without () (\n        \"secondarystat\",\n        round(\n          avg_over_time((sum without () (hofund_info) or (0 * sum_over_time(hofund_info[1w])))[1w:5m]),\n          0.001\n        )\n      )\n    )\nor on (id)\n  (sum by (id, title, subtitle, type) (0 * sum_over_time(hofund_node[1w])))\n\n```\n\n\nfinal nodes query??\n```\n      (sum by (id, title, subtitle, type) (0 * sum_over_time(hofund_node[1w])))\n    * on (id) group_left (mainstat)\n      (\n        count_values without () (\n          \"mainstat\",\n          sum by (id) (sum by (id) (sum without () (hofund_info) or (0 * sum_over_time(hofund_info[1w]))))\n        )\n      )\n  * on (id) group_left (secondarystat)\n    (\n      count_values without () (\n        \"secondarystat\",\n        round(avg_over_time((sum without () (hofund_info) or (0 * sum_over_time(hofund_info[1w])))[1w:5m]), 0.001)\n      )\n    )\n  * on (id) group_left (arc__up)\n      (\n        count_values without () (\n          \"arc__up\",\n          sum by (id) (sum by (id) (sum without () (hofund_info) or (0 * sum_over_time(hofund_info[1w])))) * 0.999999\n        )\n      )\n  * on (id) group_left (arc__down)\n      (\n        count_values without () (\n          \"arc__down\",\n          abs(sum by (id) (sum by (id) (sum without () (hofund_info) or (0 * sum_over_time(hofund_info[1w])))) - 1) * 0.999999\n        )\n      )\nor on (id)\n  (sum by (id, title, subtitle, type) (0 * sum_over_time(hofund_node[1w])) * on (id) group_left (arc__notfound)\n      (\n        count_values without () (\n          \"arc__notfound\", (0 * sum_over_time(hofund_node[1w]) + 1) * 0.999999\n        )\n      ))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogchange%2Fhofund-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogchange%2Fhofund-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogchange%2Fhofund-example/lists"}