{"id":20980509,"url":"https://github.com/hyperjumptech/munin-urlhealth-plugin","last_synced_at":"2025-03-13T10:17:17.796Z","repository":{"id":102269810,"uuid":"338367332","full_name":"hyperjumptech/munin-urlhealth-plugin","owner":"hyperjumptech","description":null,"archived":false,"fork":false,"pushed_at":"2021-02-12T17:48:55.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-20T06:33:02.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperjumptech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.txt","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-02-12T16:09:46.000Z","updated_at":"2021-02-12T17:41:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"baae236b-0f41-4a56-995f-f94418e6cc2d","html_url":"https://github.com/hyperjumptech/munin-urlhealth-plugin","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fmunin-urlhealth-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fmunin-urlhealth-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fmunin-urlhealth-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fmunin-urlhealth-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperjumptech","download_url":"https://codeload.github.com/hyperjumptech/munin-urlhealth-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243382935,"owners_count":20282051,"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-19T05:28:57.779Z","updated_at":"2025-03-13T10:17:17.760Z","avatar_url":"https://github.com/hyperjumptech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# munin-urlhealth-plugin\n\nMUNIN Plugin for monitoring a single URL.\n\n## Usecase\n\n1. Your web server is unstable, it's goes UPs and DOWNs regularly.\n2. The performance of your web server is somehow terrible and you want to know when.\n3. You use MUNIN to monitor the server but you have no MUNIN plugin that monitor a single URL.\n\n## Get your plugin\n\nFirst, you have to get to the plugin's binnary.\n\nThere're 2 ways to obtain one.\n\n1. Build your self from source code.\n2. Get the binary that you can download from our releases.\n\n### Buld your self\n\nThis plugin is made using Golang programming language.\nThus you must have installed golang in the computer you use\nfor building this plugin.\n\nAnother thing is, you got to have a machine with `make` installed.\n\nStep 1 : Clone the project into your computer.\n\n```bash\n$ git clone git@github.com:hyperjumptech/munin-urlhealth-plugin.git\n$ cd munin-urlhealth-plugin\n``` \n\nStep 2 : Depends on your target server, you can build using `make`. For example, build for linux server:\n\n```bash\n$ make build-linux\ngo fmt ./...\nmkdir -p build/linux\nenv GOOS=linux GOARCH=amd64 go build -o build/linux ./...\n```\nThe build result can be obtained from within the `build` folder\n\nYou have `build-linux`, `build-macos` and `build-windows`. Or simply `make build` to build them all.\n\n### Get the released binary\n\nYou can get a released binary for `windows`, `linux` or `macos` but\nthey are all for `amd64` architecture for other arch, you have to build\nthem from source.\n\nTo get the binnary, you can go to the release page \n\n[https://github.com/hyperjumptech/munin-urlhealth-plugin/releases](https://github.com/hyperjumptech/munin-urlhealth-plugin/releases)\n\nChoose your release version, and straight away download the binnary.\n\nOnce you get it, you might need to rename them, removing the extension and OS (for linux and macos).\n(eg. from `munin-urlhealth-plugin-linux.bin` to just `munin-urlhealth-plugin`)\n\n## Installing the binary\n\nOnce you've a copy of the plugin's binary, you should copy the binary \nfrom your build machine to your server (running munin-node).\n\n```bash\nscp path/to/munin-urlhealth-plugin myusr@targethost:/home/myusr/munin-urlhealth-plugin\n```\nNow, ssh to that server.\n\n```bash\nssh myusr@targethost\n```\n\nCopy the binary to the location of all munin plugin binary, make sure its owned by root and executable\n\n```bash\n$ sudo mv ~/munin-urlhealth-plugin /usr/share/munin/plugins\n$ sudo chown root:root /usr/share/munin/plugins\n$ sudo chmod -c 755 /usr/share/munin/plugins/munin-urlhealth-plugin\n```\n\nmake a symlink of your copied plugin to munin's plugin directory\n\n```bash\n$ ln -s /usr/share/munin/plugins/munin-urlhealth-plugin /etc/munin/plugins\n```\n\nas `root`, edit `/etc/munin/plugin-conf.d/munin-node` and add the following:\n\n```bash\n[munin-urlhealth-plugin]\nuser root\nenv.MonitorURL http://urltotest:123/somepath\n```\n\nPlease note the `env.MonitorURL` value is the URL that we want to monitor.\nChange it to the URL of your liking.\n\n---\n\nYou are done, what's left is to restart `munin-node`\n\n```bash\n$ sudo service munin-node restart\n```\n\n## How to work with the plugin\n\nThis plugin basically monitoring a HTTP URL as \nspecified in the `env.MonitorURL` environment variable\nyou've configured in the `munin-node` file\n\nWhile monitoring this URL, the plugin reports:\n\n1. **code** The response code of the url when it's called. and\n2. **response** The response time taken in millisecond for the server (serving the URL) to response back.\n\nIf the call is timed-out, or any http client error\nthe plugin will yield response code 599.\n\nIf the response time is 0, most-likely that the URL is\nnever get called due to error, network error or invalid URL.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjumptech%2Fmunin-urlhealth-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperjumptech%2Fmunin-urlhealth-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjumptech%2Fmunin-urlhealth-plugin/lists"}