{"id":28449979,"url":"https://github.com/linuxfabrik/uptimerobot","last_synced_at":"2025-07-01T13:32:13.083Z","repository":{"id":283967105,"uuid":"953411010","full_name":"Linuxfabrik/uptimerobot","owner":"Linuxfabrik","description":"A CLI tool for UptimeRobot to help manage monitors, MWindows, etc. in a stateful way using a YAML file or by command line actions.","archived":false,"fork":false,"pushed_at":"2025-06-30T06:47:07.000Z","size":169,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-30T10:50:35.014Z","etag":null,"topics":["cli","linuxfabrik","monitoring","uptimerobot","uptimerobot-api","uptimerobot-monitors"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Linuxfabrik.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"linuxfabrik"}},"created_at":"2025-03-23T09:57:33.000Z","updated_at":"2025-06-30T06:47:04.000Z","dependencies_parsed_at":"2025-05-19T23:31:33.579Z","dependency_job_id":null,"html_url":"https://github.com/Linuxfabrik/uptimerobot","commit_stats":null,"previous_names":["linuxfabrik/uptimerobot"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Linuxfabrik/uptimerobot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linuxfabrik%2Fuptimerobot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linuxfabrik%2Fuptimerobot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linuxfabrik%2Fuptimerobot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linuxfabrik%2Fuptimerobot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Linuxfabrik","download_url":"https://codeload.github.com/Linuxfabrik/uptimerobot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linuxfabrik%2Fuptimerobot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262769540,"owners_count":23361654,"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":["cli","linuxfabrik","monitoring","uptimerobot","uptimerobot-api","uptimerobot-monitors"],"created_at":"2025-06-06T14:40:13.607Z","updated_at":"2025-07-01T13:32:13.072Z","avatar_url":"https://github.com/Linuxfabrik.png","language":"Python","funding_links":["https://github.com/sponsors/linuxfabrik"],"categories":[],"sub_categories":[],"readme":"# utr - UptimeRobot CLI\n\n`utr` is a CLI tool for UptimeRobot to help manage monitors, maintenance windows, alert contacts and status pages in a stateful way either by using a YAML file or by command line actions.\n\n\n## Features\n\n- **Retrieve Account Information:**  \n  Display account details including monitor counts, SMS credits, and rate limits.\n\n- **Manage Monitors:**  \n  List, create, update, and delete monitors. Automatically convert human-friendly monitor definitions into the required UptimeRobot API format.\n\n- **Manage Maintenance Windows (MWindows):**  \n  List, create, update, or delete maintenance windows based on your YAML definitions.\n\n- **Manage Alert Contacts:**  \n  Retrieve and update alert contacts. (Note: Creating/updating alert contacts is limited by the API.)\n\n- **Command-line and YAML Support:**  \n  Use the tool directly from the command line for quick actions or maintain a YAML file to keep your configuration stateful and version-controlled.\n\n- **Flexible Output Formats:**  \n  Output data in either `yaml` or a human-friendly table format, with an option for extended reporting.\n\n\n## Prerequisites\n\n- **Python 3:**  \n  Ensure you have Python 3 installed on your system.\n\n- **UptimeRobot API Key:**  \n  You need a valid UptimeRobot API key. You can provide it directly via the command line using `--api_key` or store it in a file (default: `~/.uptimerobot`) and reference it with `--api_key_file` (default: `~/.uptimerobot`.\n\n- **Required Python Libraries:**  \n  The tool depends on some libraries, like the Linuxfabrik Python Libraries, or `pyyaml`.\n\n\n## Installation\n\n```\npip install uptimerobot-cli\nutr --help\n```\n\n\n## Usage\n\nThe tool supports several commands using subcommands. The commands support all [UptimeRobot API parameters](https://uptimerobot.com/api/). Below are the primary commands and their functions:\n\n\n### Getting help\n\nExamples:\n\n    utr --help\n    utr get --help\n    utr get monitors --help\n\n\n### Global Options\n\n- `--api_key`  \n  Provide your UptimeRobot API key directly. This option overrides the API key file.\n\n- `--api_key_file`  \n  Specify the path to the file containing your UptimeRobot API key. *(Default: `~/.uptimerobot`)*\n\n\n### Commands\n\n#### 1. `get`\n\nRetrieve information from UptimeRobot. Available resources:\n\n- **account**  \n  Run `utr get account` to display account details, including monitor usage, SMS credits, and rate limits.\n\n- **monitors**  \n  Run `utr get monitors [--output=yaml|table] [--lengthy]` to list monitors with details like friendly name, URL, type, and more. Use `--output` to choose the format (default is `table`) and `--lengthy` for extended information (only for table output).\n\n- **alert_contacts**  \n  Run `utr get alert_contacts [--output=yaml|table] [--lengthy]` to retrieve and display alert contact information.\n\n- **mwindows**  \n  Run `utr get mwindows [--output=yaml|table] [--lengthy]` to list maintenance windows with start time, end time, duration, and status.\n\n- **psps**  \n  Run `utr get psps [--output=yaml|table] [--lengthy]`\n\n\n#### 2. `apply`\n\nApply changes defined in a YAML file to your UptimeRobot account. This command processes your YAML definitions for monitors, maintenance windows, and alert contacts, and performs create, update, or delete actions accordingly.\n\nRun `utr apply /path/to/config.yaml` where the YAML file should contain definitions for:\n- `monitors`\n- `mwindows`\n- `alert_contacts`\n- `psps`\n\n*The tool will automatically convert user-friendly values to the appropriate UptimeRobot API format.*\n\n\n#### 3. `set`\n\nUpdate data for a specific resource from the command line. Currently, this command supports updating monitors.\n\nRun `utr set monitors [--field=value ...]`  \nAdditional filtering options can be passed as `--field=value` parameters to target specific monitors.\n\n*Other resources (`account`, `alert_contacts`, `mwindows`, `psps`) are marked as \"todo\" and are not yet implemented.*\n\n\n## YAML file for applying updates to the UptimeRobot configuration\n\nFor the documentation of the YAML format used by the UptimeRobot CLI, please refer to the [YAML syntax documentation](yaml.md).\n\n\n## Usage examples\n\n- **Retrieve Account Details:**  \n  `utr get account --api_key YOUR_API_KEY`\n\n- **List Monitors containing \"example\" (within `url` or `friendly_name`), in a brief table format:**  \n  `utr get monitors --output=table --search=example --api_key YOUR_API_KEY`\n\n- **List some specific Monitors in YAML Format:**  \n  `utr get monitors  --types=keyw --http_request_details=true --output=yaml`\n\n- **Get all monitors with type 2, 4 and 5:**  \n  `utr get monitors --types=2-4-5`\n\n- **The same using user-friendly parameter values:**  \n  `utr get monitors --types=keyw-port-beat --statuses=paused-down`\n\n- **Apply Changes from a YAML File:**  \n  `utr apply /home/admin/uptime_config.yaml`\n\n- **Bulk update monitors using command-line options - pausing and resuming some monitors at once:**  \n  `utr set monitors --search=example --status=paused`\n  `utr set monitors --search=example --status=up`\n\n- **Bulk update all status pages**\n  `utr set psps --status=paused`\n  `utr set psps --status=active`\n\n\n## Troubleshooting \u0026 Notes\n\n- **API Limitations:**  \n  Some operations (e.g., creating or updating alert contacts) are limited by the UptimeRobot API. The tool prints informative messages when certain actions cannot be performed.\n\n- **Keys and Values:**  \n  Additional `--key=value` options can be passed to refine API requests. These filters are processed automatically and applied to the corresponding API calls.\n\n\n## Credits, License\n\n* Authors: [Linuxfabrik GmbH, Zurich](https://www.linuxfabrik.ch)\n* License: The Unlicense, see [LICENSE file](https://unlicense.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxfabrik%2Fuptimerobot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxfabrik%2Fuptimerobot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxfabrik%2Fuptimerobot/lists"}