zabgrab.model.item¶
Item specifications: how the user selects Zabbix items.
Classes
|
Selects one item by ID, or any number of items by pattern. |
- class zabgrab.model.item.ItemSpec(*, itemid=None, host=None, name=None, key=None, tag=None)[source]¶
Bases:
BaseModelSelects one item by ID, or any number of items by pattern.
Patterns match like the Zabbix API’s searches: the whole value, ignoring case, with
*matching any text (so*CPU*findsCPUanywhere). All given patterns must match.- Parameters:
host (Annotated[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)]), Tag(tag=<value>)] | Annotated[Choice[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]], Tag(tag=<choice>)], Discriminator(discriminator=~zabgrab.model.choice._discriminate, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None)
name (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])] | None)
key (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])] | None)
tag (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])] | None)
- host¶
A pattern for the host’s technical or visible name, or a choice of them.
- model_config = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].