feat: README enhancement
This commit is contained in:
parent
b7c56d11f2
commit
40c6bed639
2 changed files with 31 additions and 33 deletions
31
README.md
31
README.md
|
|
@ -308,6 +308,35 @@ The GraphQL schema is located in the `schema/` directory and consists of:
|
||||||
|
|
||||||
For comprehensive understanding of each operation, read the detailed comments in the respective schema files.
|
For comprehensive understanding of each operation, read the detailed comments in the respective schema files.
|
||||||
|
|
||||||
|
### Zabbix to GraphQL Mapping
|
||||||
|
|
||||||
|
The API maps Zabbix entities to GraphQL types as follows:
|
||||||
|
|
||||||
|
| Zabbix Entity | GraphQL Type | Description |
|
||||||
|
|---------------|--------------|-------------|
|
||||||
|
| Host | `Host` / `Device` | Represents a Zabbix host; `Device` is a specialized `Host` with a `deviceType` tag |
|
||||||
|
| Host Group | `HostGroup` | Represents a Zabbix host group |
|
||||||
|
| Template | `Template` | Represents a Zabbix template |
|
||||||
|
| Template Group | `HostGroup` | Represents a Zabbix template group |
|
||||||
|
| Item | Nested fields in `Device` | Zabbix items become nested fields in the device based on their key names |
|
||||||
|
| Tag | `Tag` | Represents a Zabbix tag associated with a host or template |
|
||||||
|
| Inventory | `Location` | Host inventory information maps to location data |
|
||||||
|
|
||||||
|
### Zabbix Entity Relationships
|
||||||
|
|
||||||
|
- **Host Groups**: Organize hosts and templates hierarchically; represented as `HostGroup` objects in GraphQL
|
||||||
|
- **Templates**: Contain items and other configuration that can be applied to hosts; linked via template groups
|
||||||
|
- **Items**: Individual metrics collected from hosts; automatically mapped to nested GraphQL fields based on their key names
|
||||||
|
- **Tags**: Metadata associated with hosts/templates; used for classification and filtering
|
||||||
|
|
||||||
|
### Location Type Usage
|
||||||
|
|
||||||
|
The `Location` type represents geographical information from Zabbix host inventory:
|
||||||
|
|
||||||
|
- **Fields**: Includes `name`, `location_lat`, `location_lon`, and other inventory attributes
|
||||||
|
- **Usage**: Available through the `locations` query and as part of host/device objects
|
||||||
|
- **Access**: Retrieved via the `getLocations` method in the Zabbix API datasource
|
||||||
|
|
||||||
### Dynamic Schema Extension
|
### Dynamic Schema Extension
|
||||||
|
|
||||||
Extend the schema without code changes using environment variables:
|
Extend the schema without code changes using environment variables:
|
||||||
|
|
@ -383,6 +412,8 @@ The comments in these files contain real-world usage examples, implementation no
|
||||||
### Zabbix-Side Configuration
|
### Zabbix-Side Configuration
|
||||||
|
|
||||||
Before extending the schema, you need to configure Zabbix appropriately:
|
Before extending the schema, you need to configure Zabbix appropriately:
|
||||||
|
#### 0. Template Group configuration
|
||||||
|
- Create a template group `Templates/Roadwork/Devices`
|
||||||
|
|
||||||
#### 1. Host Configuration in Zabbix
|
#### 1. Host Configuration in Zabbix
|
||||||
- Create a host in Zabbix with the tag `deviceType` set to `distance-tracker`
|
- Create a host in Zabbix with the tag `deviceType` set to `distance-tracker`
|
||||||
|
|
|
||||||
|
|
@ -1,42 +1,9 @@
|
||||||
# README Improvement Plan
|
|
||||||
|
|
||||||
## Priority 1: Critical Missing Information
|
|
||||||
|
|
||||||
|
|
||||||
## Priority 2: Enhance Existing Sections
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Priority 3: Add New Sections
|
|
||||||
|
|
||||||
### 3.1 Code Generation Section
|
### 3.1 Code Generation Section
|
||||||
- Explain the GraphQL Codegen setup and how to regenerate types
|
- Explain the GraphQL Codegen setup and how to regenerate types
|
||||||
- Document the `codegen.ts` configuration
|
- Document the `codegen.ts` configuration
|
||||||
- Add instructions for updating generated types after schema changes
|
- Add instructions for updating generated types after schema changes
|
||||||
|
|
||||||
### 3.2 Troubleshooting Section
|
|
||||||
- Common connection issues with Zabbix server
|
|
||||||
- Authentication problems and solutions
|
|
||||||
- Schema extension troubleshooting
|
|
||||||
- Performance issues and optimizations
|
|
||||||
|
|
||||||
### 3.3 Security Best Practices
|
|
||||||
- Recommended authentication approaches
|
|
||||||
- Permission system best practices
|
|
||||||
- Network security considerations
|
|
||||||
- API rate limiting and protection
|
|
||||||
|
|
||||||
### 3.4 Performance and Scaling
|
|
||||||
- Performance considerations for large Zabbix installations
|
|
||||||
- Caching strategies
|
|
||||||
- Connection pooling recommendations
|
|
||||||
- Monitoring and observability setup
|
|
||||||
|
|
||||||
### 3.5 Backup and Recovery
|
|
||||||
- Configuration backup procedures
|
|
||||||
- Schema migration guidelines
|
|
||||||
- Disaster recovery procedures
|
|
||||||
|
|
||||||
## Priority 4: Improve Examples
|
## Priority 4: Improve Examples
|
||||||
|
|
||||||
### 4.1 Complete Examples
|
### 4.1 Complete Examples
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue