feat: add Zabbix 7.4 documentation samples and importHostGroups MCP tool
This commit introduces a comprehensive set of GraphQL query and mutation samples based on the official Zabbix 7.4 API documentation, along with testing and automation improvements. Changes: - Documentation: - Added 21 GraphQL sample files in docs/queries/from_zabbix_docs/ covering various Zabbix API operations. - Updated docs/howtos/cookbook.md with a new recipe for executing these documentation samples. - AI & MCP: - Added mcp/operations/importHostGroups.graphql to enable host group import via MCP tools. - Testing: - Added src/test/zabbix_docs_samples.test.ts to automatically validate all documentation samples against the GraphQL schema.
This commit is contained in:
parent
9a79fc8e4c
commit
b56255ffaa
24 changed files with 626 additions and 0 deletions
24
docs/queries/from_zabbix_docs/exportHostValueHistory.graphql
Normal file
24
docs/queries/from_zabbix_docs/exportHostValueHistory.graphql
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Source: https://www.zabbix.com/documentation/7.4/en/manual/api/reference/history/get
|
||||
|
||||
### Query
|
||||
```graphql
|
||||
query ExportHostValueHistory($host_filter: [String!], $itemKey_filter: [String!], $limit: Int) {
|
||||
exportHostValueHistory(
|
||||
host_filter: $host_filter,
|
||||
itemKey_filter: $itemKey_filter,
|
||||
limit: $limit,
|
||||
type: FLOAT
|
||||
) {
|
||||
result
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Variables
|
||||
```json
|
||||
{
|
||||
"host_filter": ["Linux server"],
|
||||
"itemKey_filter": ["system.cpu.load[all,avg1]"],
|
||||
"limit": 10
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue