fix: api version and env variables
This commit is contained in:
parent
8eb2d2d587
commit
e864d43981
2 changed files with 22 additions and 16 deletions
23
README.md
23
README.md
|
|
@ -80,15 +80,28 @@ LOG_LEVELS=info
|
|||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `ZABBIX_BASE_URL` | URL to your Zabbix server (include `/zabbix` path) | - |
|
||||
| `ZABBIX_AUTH_TOKEN` | Zabbix Super Admin API token | - |
|
||||
| `ZABBIX_AUTH_TOKEN_FOR_REQUESTS` | Token used for automated requests | - |
|
||||
| `ZABBIX_AUTH_TOKEN` | Zabbix Super Admin API token for administrative operations (full permissions needed for import/export operations) | - |
|
||||
| `ZABBIX_AUTH_TOKEN_FOR_REQUESTS` | Token used for automated requests (can be same as ZABBIX_AUTH_TOKEN or a different token with limited permissions for routine operations) | - |
|
||||
| `ZABBIX_EDGE_DEVICE_BASE_GROUP` | Base group for edge devices | - |
|
||||
| `ZABBIX_ROADWORK_BASE_GROUP` | Base group for roadwork devices | - |
|
||||
| `ZABBIX_PERMISSION_TEMPLATE_GROUP_NAME_PREFIX` | Prefix for permission template groups | `Permissions` |
|
||||
| `ZABBIX_PERMISSION_TEMPLATE_GROUP_NAME_PREFIX` | Prefix for permission template groups (used to identify permission-related template groups in Zabbix) | `Permissions` |
|
||||
| `SCHEMA_PATH` | Path to schema files | `./schema/` |
|
||||
| `ADDITIONAL_SCHEMAS` | Comma-separated list of additional schema files | - |
|
||||
| `ADDITIONAL_RESOLVERS` | Comma-separated list of resolver types to generate | - |
|
||||
| `LOG_LEVELS` | Log level configuration | - |
|
||||
| `DRY_RUN` | If set, runs in dry run mode without starting the server (exits immediately after initialization, useful for testing configuration) | - |
|
||||
| `HOST_TYPE_FILTER_DEFAULT` | Default filter for host types | - |
|
||||
| `HOST_GROUP_FILTER_DEFAULT` | Default filter for host groups | - |
|
||||
|
||||
### Authentication Tokens Explanation
|
||||
|
||||
The API supports two different authentication tokens for security separation:
|
||||
- `ZABBIX_AUTH_TOKEN`: Used for administrative operations like import/export, requires Super Admin privileges
|
||||
- `ZABBIX_AUTH_TOKEN_FOR_REQUESTS`: Used for routine read operations, can have limited permissions
|
||||
|
||||
### Edge Device Group Pattern
|
||||
|
||||
The `ZABBIX_EDGE_DEVICE_BASE_GROUP` (or `ZABBIX_ROADWORK_BASE_GROUP`) is used to create a regex pattern `FIND_ZABBIX_EDGE_DEVICE_BASE_GROUP_PREFIX` that identifies edge device groups in Zabbix. This pattern follows the format `^(${ZABBIX_EDGE_DEVICE_BASE_GROUP})\/` and is used to filter and process edge device related data.
|
||||
|
||||
## ▶️ Running the Application
|
||||
|
||||
|
|
@ -574,3 +587,7 @@ For support, please open an issue in the GitHub repository.
|
|||
Current API version: ${API_VERSION:-"Not set"}
|
||||
|
||||
The API version is automatically set during the Docker build process based on the Git tag or commit hash. During CI/CD deployment (as defined in `.forgejo/workflows/deploy-docker.yaml`), the API_VERSION is determined using `git describe --tags --always`, which creates a version identifier based on the most recent Git tag and the number of commits since that tag. This version information is then embedded into the Docker image as a build argument and becomes accessible through the API_VERSION environment variable at runtime.
|
||||
|
||||
### Zabbix Version Compatibility
|
||||
|
||||
This API is designed to work with Zabbix 7.4, which is the version it runs productively with. The API wraps the Zabbix 7.4 API and has been tested extensively with this version. While it may work with other Zabbix versions, 7.4 is the officially supported and tested version.
|
||||
|
|
@ -2,17 +2,6 @@
|
|||
|
||||
## Priority 1: Critical Missing Information
|
||||
|
||||
### 1.1 Environment Variables
|
||||
- Add documentation for `DRY_RUN` environment variable and its purpose
|
||||
- Document `HOST_TYPE_FILTER_DEFAULT` and `HOST_GROUP_FILTER_DEFAULT` configuration options
|
||||
- Explain the difference between `ZABBIX_AUTH_TOKEN` and `ZABBIX_AUTH_TOKEN_FOR_REQUESTS`
|
||||
- Add information about `FIND_ZABBIX_EDGE_DEVICE_BASE_GROUP_PREFIX` regex pattern
|
||||
|
||||
### 1.2 API Version Information
|
||||
- Fix the API version placeholder to properly display the current version
|
||||
- Add information about version compatibility between the API and Zabbix server.
|
||||
- Tested with Zabbix. 7.4
|
||||
|
||||
### 1.3 Subscription Clarification
|
||||
- Either implement actual subscription operations in the schema or clarify that only infrastructure is provided
|
||||
- If only infrastructure is provided, update the feature description to be more accurate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue