{"id":20769326,"url":"https://github.com/llaumgui/nextcloud2prom","last_synced_at":"2026-04-27T18:33:18.315Z","repository":{"id":255555611,"uuid":"852227322","full_name":"llaumgui/nextcloud2prom","owner":"llaumgui","description":"Convert a Nextcloud monitoring in JSON to prom textfile","archived":false,"fork":false,"pushed_at":"2026-01-30T08:49:50.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-31T00:29:29.368Z","etag":null,"topics":["nextcloud","prometheus-metrics","python","python3","systemd","systemd-service","systemd-timer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/llaumgui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":null,"patreon":"llaumgui"}},"created_at":"2024-09-04T12:56:30.000Z","updated_at":"2026-01-30T08:49:54.000Z","dependencies_parsed_at":"2024-09-06T02:28:24.502Z","dependency_job_id":"d23a5449-acc1-4bc5-93c6-0187d3c2ed31","html_url":"https://github.com/llaumgui/nextcloud2prom","commit_stats":null,"previous_names":["llaumgui/nextcloud2prom"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/llaumgui/nextcloud2prom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llaumgui%2Fnextcloud2prom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llaumgui%2Fnextcloud2prom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llaumgui%2Fnextcloud2prom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llaumgui%2Fnextcloud2prom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/llaumgui","download_url":"https://codeload.github.com/llaumgui/nextcloud2prom/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llaumgui%2Fnextcloud2prom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32349640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["nextcloud","prometheus-metrics","python","python3","systemd","systemd-service","systemd-timer"],"created_at":"2024-11-17T11:43:24.945Z","updated_at":"2026-04-27T18:33:18.310Z","avatar_url":"https://github.com/llaumgui.png","language":"Python","funding_links":["https://patreon.com/llaumgui"],"categories":[],"sub_categories":[],"readme":"# Nextcloud to prom\n\n\u003e [!WARNING]  \n\u003e Metrics is now a Nextcloud (\u003e=33) feature. Please [use standard endpoint](https://docs.nextcloud.com/server/latest/admin_manual/configuration_monitoring/index.html).\n\n[![Author][ico-bluesky]][link-bluesky]\n[![Software License][ico-license]](LICENSE)\n\nGet Nextcloud server's info in JSON and convert to [node_exporter textfile format](https://github.com/prometheus/node_exporter?tab=readme-ov-file#textfile-collector).\n\n![image](https://github.com/user-attachments/assets/ad11f6a0-9924-4cb8-9481-4a24d06fe803)\n\n\n## Install\n\n### On Nextcloud\n\n* Make sur that application server info is enable:\n\n```bash\nhttps://domain.ltd/settings/admin/serverinfo\n```\n\n* Set a token:\n\n```bash\nocc config:app:set serverinfo token --value MY_TOKEN\n```\n\n### On your server\n\n* Create folder /var/lib/prometheus/node-exporter\n\n```bash\nmkdir /var/lib/prometheus/node-exporter\nchown prometheus:prometheus /var/lib/prometheus/node-exporter\n```\n\n* Allow collect textfiles from it:\n\n```bash\ncat /etc/default/node_exporter\nNODE_EXPORTER_OPTS=\"--collector.textfile.directory=/var/lib/prometheus/node-exporter\"\n```\n\n* Get scripts:\n\n```bash\ncd /tmp\ngit clone https://github.com/llaumgui/nextcloud2prom.git\ncd nextcloud2prom\n```\n\n* Install requirements from `dnf`, `apt`, etc. Or use `pip`:\n\n```bash\npip install -r requirements.txt\n```\n\n* Install scripts:\n\n```bash\ncp prom_nextcloud.py /usr/local/bin\nchmod +x /usr/local/bin/prom_nextcloud.py\ncp system.d/prom* /etc/systemd/system\n```\n\n* Edit /etc/systemd/system/prom-nextcloud.service with your `NC_URL` and `NC_TOKEN` informations.\n* Check:\n\n```bash\nsystemd-analyze verify /etc/systemd/system/prom-nextcloud*\nsystemctl start prom-nextcloud.service\n```\n\n* and start systemd:\n\n```bash\nsystemctl start prom-nextcloud.timer\nsystemctl enable prom-nextcloud.timer\n```\n\n## Develop\n\n```bash\npython -m venv env\nsource env/bin/activate\npip install -r requirements.txt\n```\n\n[ico-bluesky]: https://img.shields.io/static/v1?label=Author\u0026message=llaumgui\u0026color=208bfe\u0026logo=bluesky\u0026style=flat-square\n[link-bluesky]: https://bsky.app/profile/llaumgui.kulakowski.fr\n[ico-version]: https://img.shields.io/docker/v/llaumgui/httpd?sort=semver\u0026color=%2496ed\u0026logo=docker\u0026style=flat-square\n[ico-license]: https://img.shields.io/github/license/llaumgui/nextcloud2prom?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllaumgui%2Fnextcloud2prom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllaumgui%2Fnextcloud2prom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllaumgui%2Fnextcloud2prom/lists"}