{"id":22341851,"url":"https://github.com/mightybroccoli/nextcloud-munin-py","last_synced_at":"2026-04-04T03:36:15.294Z","repository":{"id":116639349,"uuid":"147266806","full_name":"mightyBroccoli/nextcloud-munin-py","owner":"mightyBroccoli","description":"simple Munin Plugin to gather data from the external API","archived":false,"fork":false,"pushed_at":"2020-04-06T07:20:42.000Z","size":65,"stargazers_count":5,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-22T03:48:51.461Z","etag":null,"topics":["munin","munin-plugins","nextcloud","nextcloud-installation","requests"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mightyBroccoli.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,"zenodo":null}},"created_at":"2018-09-04T00:31:17.000Z","updated_at":"2022-12-02T05:05:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d1293a9-bbd4-4310-89b9-63879382a07f","html_url":"https://github.com/mightyBroccoli/nextcloud-munin-py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mightyBroccoli/nextcloud-munin-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mightyBroccoli%2Fnextcloud-munin-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mightyBroccoli%2Fnextcloud-munin-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mightyBroccoli%2Fnextcloud-munin-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mightyBroccoli%2Fnextcloud-munin-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mightyBroccoli","download_url":"https://codeload.github.com/mightyBroccoli/nextcloud-munin-py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mightyBroccoli%2Fnextcloud-munin-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31387017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T01:22:39.193Z","status":"online","status_checked_at":"2026-04-04T02:00:07.569Z","response_time":60,"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":["munin","munin-plugins","nextcloud","nextcloud-installation","requests"],"created_at":"2024-12-04T08:08:24.186Z","updated_at":"2026-04-04T03:36:15.289Z","avatar_url":"https://github.com/mightyBroccoli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nextcloud Munin Plugin [![CodeFactor](https://www.codefactor.io/repository/github/mightybroccoli/nextcloud-munin-py/badge/master)](https://www.codefactor.io/repository/github/mightybroccoli/nextcloud-munin-py/overview/master)\nThis repository contains some basic Munin Plugins for gathering information from the NextCloud external API. To further simplify the monitory process I choose to also include a multigraph plugin `nextcloud_multi.py` which does everything the other plugins do in a single plugin.\n\nThere are requirements for using a multigraph plugin which can be read up here : [Munin-Monitoring.org/multigraphing](http://guide.munin-monitoring.org/en/latest/plugin/multigraphing.html)\n\n## install\n### requirements\nThe Python environment need to have access to the [requests](https://github.com/psf/requests) module. It is possible to run the plugins in a virtual environment, with the virtual environment tool of your choice.\nThe `requirements.txt` file contains all necessary libraries pip will install.\n```\nvirtualenv -p python3 /path/to/your/venv\npip install -r requirements.txt\n```\n\n#### Tip\nUnfortunately you need to invoke the plugin with the virtual environment runtime. Thus you have to change the shebang from '#!/usr/bin/env python3' to the python3 path, or you could simply add a wrapper script.\nThat way you only modify untracked files which helps with git updates.\n```bash\n#!/bin/bash\n# path to my virtual env python runtime                            # the unchanged nextcloud_multi.py file\n/usr/share/munin/custom-plugins/nextcloud-munin-py/venv/bin/python /usr/share/munin/custom-plugins/nextcloud-munin-py/nextcloud_multi.py $@\n```\n\n### configuration\nTo use these plugins properly some configuration parameters need to be added to the plugin-config `/etc/munin/plugin-config.d/z-custom-config`. \n```\n[nextcloud_*]\nenv.username username\nenv.password password or logintoken\nenv.url https://URL.TO.YOUR.NEXTCLOUD.tld/ocs/v2.php/apps/serverinfo/api/v1/info\n```\n\n### activating the plugin\nFinally you need to symlink the plugins you would like to activate into the munin plugin directory eg. `/etc/munin/plugins/`. \nOr if you want to use the multigraph plugin only symlink that one the the munin plugin directory.\n\nAfter this has been done the munin-node needs to be restarted to facilitate the new plugins.\n`systemctl restart munin-node`\n\n### everything working?\nTo check if everything is working as expected check if the plugins are listed and actually gather data.\n```\ntelnet localhost 4949 # localhost or IP the munin-node\nlist\nfetch nextcloud_shares.py\nnum_fed_shares_received.value 1\nnum_shares_link_no_password.value 5\nnum_shares_user.value 13\nnum_shares.value 21\nnum_shares_link.value 5\nnum_shares_groups.value 0\nnum_fed_shares_sent.value 0\n```\nIf everything works as it should, list will return the symlinked plugins within the list of active plugins. \n\n##### multipgrah plugin\nTo check if the multigraph plugin is working correctly, it is necessary to first instruct the multigraph capability, before the `list` instruction will list the plugin.\n```\ntelnet localhost 4949 # localhost or IP the munin-node\ncap multigraph\nlist\nfetch nextcloud_multi.py\nmultigraph nextcloud_shares\nnum_fed_shares_received.value 1\nnum_shares_link_no_password.value 5\nnum_shares_user.value 13\nnum_shares.value 21\nnum_shares_link.value 5\nnum_shares_groups.value 0\nnum_fed_shares_sent.value 0\n...\n```\n\nThe `fetch` commands will run the script and return the gathered values. As long as none of them are NaN everything works as expected.\n\n### uninstall\nTo remove the plugins from munin remove all symlinked plugins from the directory and restart the node.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmightybroccoli%2Fnextcloud-munin-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmightybroccoli%2Fnextcloud-munin-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmightybroccoli%2Fnextcloud-munin-py/lists"}