{"id":19402842,"url":"https://github.com/cscfi/pyops","last_synced_at":"2025-09-08T02:42:59.699Z","repository":{"id":45004075,"uuid":"54620594","full_name":"CSCfi/pyops","owner":"CSCfi","description":"Python wrapper for the Opsview REST API","archived":false,"fork":false,"pushed_at":"2023-07-04T10:37:12.000Z","size":31,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T07:34:55.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CSCfi.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-03-24T06:42:33.000Z","updated_at":"2023-12-05T10:56:40.000Z","dependencies_parsed_at":"2024-11-10T11:26:35.625Z","dependency_job_id":null,"html_url":"https://github.com/CSCfi/pyops","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CSCfi/pyops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSCfi%2Fpyops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSCfi%2Fpyops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSCfi%2Fpyops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSCfi%2Fpyops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CSCfi","download_url":"https://codeload.github.com/CSCfi/pyops/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSCfi%2Fpyops/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274125342,"owners_count":25226488,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"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":[],"created_at":"2024-11-10T11:26:01.643Z","updated_at":"2025-09-08T02:42:59.676Z","avatar_url":"https://github.com/CSCfi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyops - Python bindings for the Opsview API\n\n## Installation\n\n```sh\npip install git+ssh://git@github.com/CSCfi/pyops.git\n```\n\n## Usage\n\nSee command help with `pyops-downtime --help`.\nPyOPS expects to find the following variables:\n\n- `prod_ops_base` -- The REST API endpoint of your OpsView-instance\n- `prod_ops_user` -- username to be used to login to opsview\n- `prod_ops_pass` -- password for the user\n\nCan be setup with following:\n\n```sh\nexport prod_ops_base=\"https://\u003cyour-opsview-server\u003e/opsview/rest/\"\nexport prod_ops_user=\"$USER\"\nread -s prod_ops_pass \u0026\u0026 export prod_ops_pass # Read OpsView password from stdin\n```\n\nOptional arguments:\n\n```none\n-e ENDTIME, --endtime ENDTIME\n            Downtime end time in an opsview format (e.g. +10m, +2d or '2018-08-10 15:00').\n-d, --delete          Delete downtimes instead of adding them.\n-c COMMENT, --comment COMMENT\n                    Comment for the downtime\n-s STARTTIME, --starttime STARTTIME\n                    Start time in an opsview format ('2018-08-10 13:00'). Defaults to 'now'\n-g, --group     Interpret the host list as a list of hostgroup names,\n                    and apply the downtime to all the hosts in the groups.\n```\n\n### Setting/Deleting a downtime for node(s)\n\n```sh\n# Individual nodes\npyops-downtime -e +1d -c \"Server maintenance\" testserver1 testserver2\n## Delete\npyops-downtime -d testserver1 testserver2\n\n# A named group of nodes\npyops-downtime -e +2h -c \"Server maintenance\" -g \"My Monitoring Group\"\npyops-downtime -d -g \"My Monitoring Group\"\n```\n\n### Other Examples\n\nExample scripts for inspiration can be found from `./examples/`.\n\n\u003e Copy and edit as needed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcscfi%2Fpyops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcscfi%2Fpyops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcscfi%2Fpyops/lists"}