{"id":17775531,"url":"https://github.com/mjonuschat/mamalluca","last_synced_at":"2025-04-01T16:25:48.121Z","repository":{"id":237592951,"uuid":"762113986","full_name":"mjonuschat/mamalluca","owner":"mjonuschat","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-04T02:13:05.000Z","size":390,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T10:36:10.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mjonuschat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-02-23T05:35:39.000Z","updated_at":"2024-05-04T02:11:55.000Z","dependencies_parsed_at":"2024-05-02T19:02:50.163Z","dependency_job_id":"36a3c2a0-638b-46c6-82e5-5d4ff3ee1901","html_url":"https://github.com/mjonuschat/mamalluca","commit_stats":null,"previous_names":["mjonuschat/mamalluca"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjonuschat%2Fmamalluca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjonuschat%2Fmamalluca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjonuschat%2Fmamalluca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjonuschat%2Fmamalluca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjonuschat","download_url":"https://codeload.github.com/mjonuschat/mamalluca/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246669472,"owners_count":20814822,"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-10-26T21:57:48.077Z","updated_at":"2025-04-01T16:25:48.093Z","avatar_url":"https://github.com/mjonuschat.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Mamalluca\n\nMamalluca is a Prometheus exporter for Klipper and Moonraker to instrument and capture metrics for your 3D printer.\n\nEach Mamalluca instance will monitor a single Moonraker instance and export metrics on a dedicated HTTP listener.\nMamalluca does not need to run on the same host as Moonraker as long as it can establish a Websocket connection to the Moonraker instance.\n\nMamalluca provides a Prometheus scrape target over HTTP on a configurable port.\n\n## Example Dashboard\n\n\u003cimg src=\"./assets/images/dashboard.png\" width=\"800\" alt=\"Example Dashboard\"\u003e\n\n## Installation\n\nDownload the latest version for your platform from [GitHub Releases](github.com/mjonuschat/mamalluca/releases/latest). Precompiled binaries are provides for the following operating systems and CPU architectures:\n\n- aarch64-linux\n- x86_64-linux\n- aarch64-macos\n- x86_64-macos\n- x86_64-windows\n\n### Download \u0026 Install\n\n```bash\nmkdir -p $HOME/mamalluca\ncd $HOME/mamalluca\nwget https://github.com/mjonuschat/mamalluca/releases/latest/download/mamalluca-aarch64-linux\nchmod a+x mamalluca-aarch64-linux\nmv mamalluca-aarch64-linux mamalluca\n```\n\n### Verify connectivity\n\nThe following command will start the exporter and try to connect to the Moonraker instance on the local host.\nIf the command is successfull you should start seeing messages about status updates being processed.\n\n```bash\n./mamalluca -vv\n```\n\n**Example output**\n```text\n2024-04-30T02:11:44.149790Z  INFO ezsockets::client: connecting to ws://127.0.0.1:7125/websocket...\n2024-04-30T02:11:44.149915Z  INFO ezsockets::client: connecting attempt no: 1...\n2024-04-30T02:11:49.403001Z DEBUG tungstenite::handshake::client: Client handshake done.\n2024-04-30T02:11:49.403278Z  INFO ezsockets::client: successfully connected\n2024-04-30T02:11:49.403567Z  INFO ezsockets::client: connected to ws://127.0.0.1:7125/websocket\n2024-04-30T02:11:49.403832Z  INFO mamalluca::moonraker::handler: Connected to Moonraker url=\"ws://127.0.0.1:7125/websocket\"\n2024-04-30T02:11:49.573639Z DEBUG mamalluca::moonraker::handler: Processing status update key=\"controller_fan controller_fan\"\n...\n```\n\n**Checking metrics exporter**\n\nBy default the metrics exporter listens on all interfaces of the computer on port `9000`. Assuming your printer is reachable with the name `printer.local` you can open [http://printer.local:9000/](http://printer.local:9000/) and see the metrics that are being exported so far.\n\n### Running the exporter in the background\n\nUse the following instructions to create and enable a systemd unit file to start Mamalluca. Make sure to adjust the paths and usernames as needed if your user is not named `pi`.\n\n```bash\ncd $HOME/mamalluca\nnano $HOME/mamalluca/mamalluca.service\nsudo systemctl link mamalluca/mamalluca.service\nsudo systemctl enable mamalluca\nsudo systemctl start mamalluca\n```\n\n**mamalluca.service**\n```text\n[Unit]\nDescription=Moonraker/Klipper Prometheus Exporter\nDocumentation=https://github.com/mjonuschat/mamalluca\nAfter=moonraker.service\n\n[Install]\nWantedBy=multi-user.target\n\n[Service]\nType=simple\nUser=pi\nRemainAfterExit=no\nWorkingDirectory=/home/pi/mamalluca\nExecStart=/home/pi/mamalluca/mamalluca -v\nRestart=always\nRestartSec=10\nMemoryAccounting=on\nMemoryMax=256M\n```\n\n**Verifying Mamalluca is running**\n\nThe following command should show that the service is active and running:\n\n```bash\nsystemctl status mamalluca\n```\n\n```text\n● mamalluca.service - Moonraker/Klipper Prometheus Exporter\n     Loaded: loaded (/etc/systemd/system/mamalluca.service; enabled; preset: enabled)\n     Active: active (running) since Wed 2024-05-01 19:10:07 PDT; 1s ago\n     ...\n```\n## Contributing\n\nContributions are always welcome! Take a look at the open [issues](https://github.com/mjonuschat/mamalluca/issues) for ideas of where to get started or open a pull request with your bugfix/feature/enhancement.\n\n\n## Authors\n\n- [@mjonuschat](https://www.github.com/mjonuschat)\n\n\n## License\n\n[GNU General Public License v3.0](https://choosealicense.com/licenses/gpl-3.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjonuschat%2Fmamalluca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjonuschat%2Fmamalluca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjonuschat%2Fmamalluca/lists"}