{"id":13496943,"url":"https://github.com/lasseoe/zabbixctl","last_synced_at":"2025-03-28T21:31:46.940Z","repository":{"id":181377022,"uuid":"666045244","full_name":"lasseoe/zabbixctl","owner":"lasseoe","description":"The most effective way for operating Zabbix servers on the command line","archived":false,"fork":false,"pushed_at":"2023-07-25T08:17:20.000Z","size":161,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T19:55:23.201Z","etag":null,"topics":["zabbix","zabbix-api"],"latest_commit_sha":null,"homepage":"https://zabbixctl.com","language":"Go","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/lasseoe.png","metadata":{"files":{"readme":"README.md","changelog":"history.go","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}},"created_at":"2023-07-13T15:21:53.000Z","updated_at":"2023-11-30T14:15:08.000Z","dependencies_parsed_at":"2024-01-18T22:57:45.951Z","dependency_job_id":null,"html_url":"https://github.com/lasseoe/zabbixctl","commit_stats":null,"previous_names":["lasseoe/zabbixctl"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasseoe%2Fzabbixctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasseoe%2Fzabbixctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasseoe%2Fzabbixctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasseoe%2Fzabbixctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lasseoe","download_url":"https://codeload.github.com/lasseoe/zabbixctl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246105079,"owners_count":20724250,"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":["zabbix","zabbix-api"],"created_at":"2024-07-31T20:00:18.517Z","updated_at":"2025-03-28T21:31:46.681Z","avatar_url":"https://github.com/lasseoe.png","language":"Go","funding_links":[],"categories":["Tools"],"sub_categories":["Terraform"],"readme":"[![CI](https://github.com/lasseoe/zabbixctl/actions/workflows/go.yml/badge.svg)](https://github.com/lasseoe/zabbixctl/actions/workflows/go.yml) ![license](https://img.shields.io/github/license/lasseoe/zabbixctl)\n\n\n[![zabbixctl](https://zabbixctl.com/img/zabbixctl-gh-logo.png)](https://zabbixctl.com)\n\n**zabbixctl** is a tool for working with the Zabbix server API using the command line\ninterface, it provides an effective way for operating on trigger status,\nlatest host data and groups of users.\n\n![dashboard](http://i.imgur.com/0WZkMN0.gif)\n\n## :information_source: State of the project\n\n### 2023-07-13\nIt would appear that the original project is dead, so I decided to clone it and will bring it up to date \u0026 add a lot of new features.\nSuggestions are most welcome, please [create an issue](https://github.com/lasseoe/zabbixctl/issues) and describe what you'd like to see added or changed.\n\n### 2023-07-23\n- [x] Support for Zabbix v5.0 and above (support for \u003c5.0 has been dropped).\n- [x] Item type names are now correctly reported.\n- [x] Support natural language date \u0026 times ([examples](https://zabbixctl.com/datetime.html)).\n- [x] Override password config setting with env ZABBIXCTL_USERPASS.\n- [x] Allow insecure HTTPS using \"insecure\" config setting.\n- [ ] Documentation is a work in progress.\n\n## Installation\n\nBinaries are published on the [release page](https://github.com/lasseoe/zabbixctl/releases).\n\nIf you prefer to install from source and have Go installed, it's as simple as\n\n```\ngo get github.com/lasseoe/zabbixctl\n```\n\nafterwards the executable will be available at `$GOPATH/bin/zabbixctl`\n\n## Configuration\n\n**zabbixctl** reads its configuration from ~/.config/zabbixctl.conf and must be\nwritten using the following syntax:\n\n```toml\n[server]\n  address  = \"https://zabbix.local\"\n  username = \"admin\"\n  password = \"password\"\n  insecure = \"false\"\n\n[session]\n  path = \"~/.cache/zabbixctl.session\"\n```\n\n**zabbixctl** will authorize against 'zabbix.local' using given user\ncredentials and save a Zabbix session to a file `~/.cache/zabbixctl.session`\nand at second run will use saved session instead of re-authorizing.\nZabbix sessions have a default TTL of 15 minutes, so if the saved Zabbix\nsession is outdated, zabbixctl will repeat authorization and rewrite the\nsession file.\nThe *password* setting is now optional and zabbixctl will use the password\nfound in environment variable ZABBIXCTL_USERPASS, if present.\n\n## Usage\n\n####  -T --triggers\nSearch on zabbix triggers statuses. Triggers could be filtered using\n/\u003cpattern\u003e argument, for example, search and acknowledge all triggers in a\nproblem state and match the word 'cache':\n```\n  zabbixctl -Tp /cache\n```\n\n##### -y --only-nack\nShow only not acknowledged triggers.\n\n##### -x --severity\nSpecify minimum trigger severity.  Once for information, twice for\nwarning, three for disaster, four for high, five for disaster.\n\n##### -p --problem\nShow triggers that have a problem state.\n\n##### -r --recent\nShow triggers that have recently been in a problem state.\n\n##### -s --since \u003cdate\u003e\nShow triggers that have changed their state after the given time, default: 7\ndays ago\n\n##### -u --until \u003cdate\u003e\nShow triggers that have changed their state before the given time.\n\n##### -m --maintenance\nShow hosts in maintenance.\n\n##### -i --sort \u003cfields\u003e\nShow triggers sorted by specified fields, default: lastchange,priority.\n\n##### -o --order \u003corder\u003e\nShow triggers in specified order, default: DESC.\n\n##### -n --limit \u003camount\u003e\nShow specified amount of triggers.\n\n##### -k --acknowledge\nAcknowledge all retrieved triggers.\n\n##### -f --noconfirm\nDo not prompt acknowledge confirmation dialog.\n\n####  -L --latest-data\nSearch and show latest data for specified host(s). Hosts can be searched using\nwildcard character '*'.  Latest data can be filtered using /\u003cpattern\u003e argument,\nfor example retrieve latest data for database nodes and search information\nabout replication:\n\n```\nzabbixctl -L dbnode* /replication\n```\n\n##### -g --graph\nShow links on graph pages.\n\n#####  -G --groups\nSearch and operate on configuration of users groups.\n\n##### -l --list\nShow list users in specified users group.\n\n##### -a --add\nAdd specified \u003cuser\u003e to specified users group.\n\n##### -r --remove\nRemove specified \u003cuser\u003e from speicifed users group.\n\n##### -f --noconfirm\nDo not prompt confirmation dialog.\n\n##### -w --stacked | -b --normal\nReturns single link which points to the stacked or normal graph for matched\nitems.\n\n#### -M --maintenances\nSearch and operate on configuration of maintenance. Maintenance could be\nfiltered using /\u003cpattern\u003e argument, for example, search maintenance match the\nword 'update-kernel':\n\n```\nzabbixctl -M dbnode-* /update-kernel\n```\n\n##### -a --add\nAdd new specified \u003cmaintenance\u003e with timeperiod type once.\n\n##### -r --remove\nRemove specified \u003cmaintenance\u003e.\n\n#### -H --hosts\nSearch and operate with host.\n\n```\nzabbixctl -H dbnode-*\n```\n\n##### -r --remove\nRemove specified \u003chost\u003e.\n\n## Examples\n\n### Listing triggers in a problem state\n\n```\nzabbixctl -Tp\n```\n\n### Listing triggers that have recenty been in a problem state\n\n```\nzabbixctl -Tr\n```\n\n### Listing and filtering triggers that contain a word mysql\n\n```\nzabbixctl -T /mysql\n```\n\n### Listing and acknowledging triggers that severity level is DISASTER\n\n```\nzabbixctl -T -xxxxx -k\n```\n\n### Listing latest data for db nodes and filtering for information about replication lag\n\n```\nzabbixctl -L dbnode* /lag\n```\n\n### Opening stacked graph for CPU quote use of selected containers\n\n```\nzabbixctl -L 'container-*' /cpu quota --stacked\n```\n\n### Listing users groups that starts with 'HTTP_'\n\n```\nzabbixctl -G HTTP_*\n```\n\n### Listing users groups that contain user admin\n\n```\nzabbixctl -G /admin\n```\n\n### Adding user admin to groups that contain user guest\n\n```\nzabbixctl -G /guest -a admin\n```\n\n### Listing maintenances period\n\n```\nzabbixctl -M\n```\n\n### Listing maintenances period with hostname like 'dbnode*'\n\n```\nzabbixctl -M dbnode*\n```\n\n### Listing maintenances period with hostname like 'dbnode*' with filter\nmaintenance name update-kernel\n\n```\nzabbixctl -M dbnode* /update-kernel\n```\n\n### Add maintenance period name update-kernel with hostname like 'dbnode*'\n\n```\nzabbixctl -M dbnode* -a update-kernel\n```\n\n### Add maintenance period name update-kernel with host from stdin (must be flag -f)\n\naxfr is a tool of your choice for retrieving domain information from your infrastructure DNS.\n\n```\naxfr | grep phpnode | zabbixctl -M -z -a update-kernel -f\n```\n\n### Add maintenance period name update-kernel with hostname like 'dbnode*' and read additional\nhost from stdin (must be flag -f)\n\naxfr is a tool of your choice for retrieving domain information from your infrastructure DNS.\n\n```\naxfr | grep phpnode | zabbixctl -M -z dbnode* -a update-kernel -f\n```\n\n### Remove maintenance period name update-kernel\n\n```\nzabbixctl -M -r update-kernel\n```\n\n### Search host with hostname like 'dbnode*'\n\n```\nzabbixctl -H dbnode*\n```\n\n### Remove host with hostname 'dbnode1' (full uniq name)\n\n```\nzabbixctl -H -r dbnode1\n```\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flasseoe%2Fzabbixctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flasseoe%2Fzabbixctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flasseoe%2Fzabbixctl/lists"}