CMK version:2.0.0p37 (CRE)
OS version:Centos7
Error message:plugin not available
**Output of “cmk --debug -vvn hostname”:
# .1.3.6.1.2.1.43.9.2.1.8.1.1 Brother
#.1.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.1 MODEL=\"MFC-L6900DW series\"
#.1.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.2 CTYPE = \"MFC\"
#.1.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.3 SERIAL=\"E79648D2N12345\"
from .agent_based_api.v1 import (
Attributes,
register,
SNMPTree,
startswith,
)
register.snmp_section(
name="brother_info",
fetch=[
SNMPTree(
base=".1.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2",
oids=[
"1", # MODEL
"3", # SerialNo
],
),
],
detect=startswith(".1.3.6.1.2.1.43.9.2.1.8.1.1", "Brother"),
)
def inventory_brother_info(section):
model, serial = section[0][0]
yield Attributes(
path=["hardware", "system"],
inventory_attributes={
"serial_number": serial,
"model_name": model,
},
)
register.inventory_plugin(
name='brother_info',
inventory_function=inventory_brother_info,
)