This Python script is used to export Zabbix templates from a Zabbix server and push them to a local git repository.
- Python 3.x
- Git
- Zabbix server access
- API key for Zabbix server
-
Clone the repository:
git clone <repository_url>
-
Install the required Python packages:
pip install requests
-
Configure the script by setting the following variables:
- ZABBIX_API_URL: URL of the Zabbix server API
- AUTH: API key for accessing the Zabbix server
- SELECTED_TEMPLATES_GROUPID: Group ID of the selected templates in Zabbix
- PATH_TO_LOCAL_GIT_REPO: Path to the local git repository
- GIT_PUSH: Boolean to enable/disable pushing changes to the git repository
Run the script:
python zabbix_template_export.py