enrobie.plugins.nagios package#
Submodules#
enrobie.plugins.nagios.ainswer module#
- async enrobie.plugins.nagios.ainswer.nagios_current(context: RunContext[AinswerDepends]) list[NagiosCurrentRecords][source]#
Return the current status for infratstructure in Nagios.
Note
This tool will return status values from Nagios Core. Nagios is a network and system monitoring platform.
- Returns:
Current status for infratstructure in Nagios.
enrobie.plugins.nagios.current module#
- class enrobie.plugins.nagios.current.NagiosCurrentObject[source]#
Bases:
BaseModelInformation regarding the item within Nagios monitoring.
Fields# Field
Type
Required
Default
Constraints
Yes
Yes
Yes
min_length=1
Yes
min_length=1
Yes
min_length=1
- name: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Name of the object in Nagios', metadata=[MinLen(min_length=1)])]#
- status: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Current status for the object', metadata=[MinLen(min_length=1)])]#
- latest: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='When the latest event occurred', metadata=[MinLen(min_length=1)])]#
- class enrobie.plugins.nagios.current.NagiosCurrentHost[source]#
Bases:
NagiosCurrentObjectInformation regarding the item within Nagios monitoring.
- class enrobie.plugins.nagios.current.NagiosCurrentService[source]#
Bases:
NagiosCurrentObjectInformation regarding the item within Nagios monitoring.
Fields# Field
Type
Required
Default
Constraints
downtimeYes
handledYes
Yes
min_length=1
latestYes
min_length=1
nameYes
min_length=1
statusYes
min_length=1
- class enrobie.plugins.nagios.current.NagiosCurrentRecords[source]#
Bases:
BaseModelSummarized information regarding the items within Nagios.
Fields# Field
Type
Required
Default
Yes
Yes
- hosts: Annotated[list[NagiosCurrentHost], FieldInfo(annotation=NoneType, required=True, description='System related status values')]#
- services: Annotated[list[NagiosCurrentService], FieldInfo(annotation=NoneType, required=True, description='Service related status values')]#
- class enrobie.plugins.nagios.current.NagiosCurrentSummary[source]#
Bases:
BaseModelSummarized information regarding the items within Nagios.
Fields# Field
Type
Required
Default
Constraints
Yes
ge=0
Yes
ge=0
Yes
ge=0
Yes
ge=0
- service_normal: Annotated[int, FieldInfo(annotation=NoneType, required=True, description='Object count in normal state', metadata=[Ge(ge=0)])]#
- service_issues: Annotated[int, FieldInfo(annotation=NoneType, required=True, description='Object count in issue state', metadata=[Ge(ge=0)])]#
- class enrobie.plugins.nagios.current.NagiosCurrent(plugin: NagiosPlugin)[source]#
Bases:
objectCollect the information using the upstream API endpoint.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
- request(item: Literal['host', 'service']) Response[source]#
Return the response from upstream API endpoint request.
- Parameters:
item – Determine which items will be enumerated.
- Returns:
Response from upstream API endpoint request.
- property hosts: list[NagiosCurrentHost]#
Return the response from upstream API endpoint request.
- Returns:
Response from upstream API endpoint request.
- property services: list[NagiosCurrentService]#
Return the response from upstream API endpoint request.
- Returns:
Response from upstream API endpoint request.
- property summary: NagiosCurrentSummary#
Return the response from upstream API endpoint request.
- Returns:
Response from upstream API endpoint request.
- property records: NagiosCurrentRecords#
Return the response from upstream API endpoint request.
- Returns:
Response from upstream API endpoint request.
enrobie.plugins.nagios.helpers module#
- enrobie.plugins.nagios.helpers.composedsc(plugin: NagiosPlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.nagios.helpers.composeirc(plugin: NagiosPlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.nagios.helpers.composemtm(plugin: NagiosPlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
enrobie.plugins.nagios.params module#
- class enrobie.plugins.nagios.params.NagiosPluginCommandParams[source]#
Bases:
RobieParamsModelProcess and validate the Robie configuration parameters.
Fields# Field
Type
Required
Default
Constraints
No
'!nagios'min_length=2
No
'!nagios'min_length=2
No
'!nagios'min_length=2
- irc: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='!nagios', description='Command name for chat platform', metadata=[MinLen(min_length=2)])]#
- class enrobie.plugins.nagios.params.NagiosPluginParams[source]#
Bases:
RobiePluginParamsProcess and validate the Robie configuration parameters.
Fields# Field
Type
Required
Default
Constraints
Yes
min_length=1
No
factory
enableNo
FalselocateNo
Nonemin_length=1
No
Nonemin_length=1
Yes
min_length=1
No
Nonemin_length=1
No
TrueNo
factory
No
30ge=1, le=300
trustedNo
Nonemin_length=1
No
Nonemin_length=1
- command: Annotated[NagiosPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=NagiosPluginCommandParams, description='Command name per chat platform')]#
- restful: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Where to find the RESTful API', examples=['http://localhost:8420'], metadata=[MinLen(min_length=1)])]#
- username: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
- password: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
- timeout: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=30, description='Timeout connecting to server', metadata=[Ge(ge=1), Le(le=300)])]#
- ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#
- ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#
- clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])]#
- status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#
enrobie.plugins.nagios.plugin module#
- class enrobie.plugins.nagios.plugin.NagiosPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#
Bases:
RobiePluginIntegrate with the Robie routine and perform operations.
Note
This plugin allows for connecting to Nagios Console.
- classmethod schema() Type[NagiosPluginParams][source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property params: NagiosPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property current: NagiosCurrent#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
Module contents#
- class enrobie.plugins.nagios.NagiosPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#
Bases:
RobiePluginIntegrate with the Robie routine and perform operations.
Note
This plugin allows for connecting to Nagios Console.
- classmethod schema() Type[NagiosPluginParams][source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property params: NagiosPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property current: NagiosCurrent#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- class enrobie.plugins.nagios.NagiosPluginParams[source]#
Bases:
RobiePluginParamsProcess and validate the Robie configuration parameters.
Fields# Field
Type
Required
Default
Constraints
Yes
min_length=1
No
factory
enableNo
FalselocateNo
Nonemin_length=1
No
Nonemin_length=1
Yes
min_length=1
No
Nonemin_length=1
No
TrueNo
factory
No
30ge=1, le=300
trustedNo
Nonemin_length=1
No
Nonemin_length=1
- command: Annotated[NagiosPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=NagiosPluginCommandParams, description='Command name per chat platform')]#
- restful: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Where to find the RESTful API', examples=['http://localhost:8420'], metadata=[MinLen(min_length=1)])]#
- username: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
- password: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
- timeout: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=30, description='Timeout connecting to server', metadata=[Ge(ge=1), Le(le=300)])]#
- ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#
- ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#
- clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])]#
- status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#