Collecting Hardware Data from MIB (SNMP)
It is possible to collect hardware asset data using the SNMP protocol - via MIB collection - and add to the information of a configuration item in the Configuration Management process.
What to do before
It is necessary to have deployed the 4biz Inventory Version 1.2.1.9 or higher (see Installation overview );
In the standalone-full.xml file, add the property snmp.oid.repository.directory containing the folder path where the XML files with the layout will be;
Have an inventory process defined via Configuration Management;;
Inventory the SNMP configuration item for collecting MIB.
Creating Model
Model:
<ITS-TYPE-ITEM oid-validator="(OID of a specific property that will allow the rest of the file to be interpreted. If no value is returned, the TYPE-ITEM is not created.)">
<ITS-CHARACTERISTIC>(OID of the information you want)</ITS-CHARACTERISTIC>
<CHARACTERISTIC-IN-HEXA type="hex">(OID of the information that the returned value needs to be converted from HEXADECIMAL)</CHARACTERISTIC-IN-HEXA>
</ITS-TYPE-ITEM>Example:
<PRINTER oid-validator=".1.3.6.1.2.1.43.5.1.1.16.1">
<NAME>.1.3.6.1.2.1.43.5.1.1.16.1</NAME>
<DESCRIPTION type="hex">.1.3.6.1.2.1.43.5.1.1.16.1</DESCRIPTION>
<NUMBER-PAGES-PRINTED>.1.3.6.1.2.1.43.10.2.1.4.1.1</NUMBER-PAGES-PRINTED>
<CAPACITY-TOTAL-TONER>.1.3.6.1.2.1.43.11.1.1.8.1.1</CAPACITY-TOTAL-TONER>
<CAPACITY-CURRENT-TONER>.1.3.6.1.2.1.43.11.1.1.9.1.1</CAPACITY-CURRENT-TONER>
</PRINTER>Deploying Model
After creating the model, it is necessary to save it in the folder indicated in the snmp.oid.repository.directory parameter of the application server.
After the model deployment, at the time of inventory execution, the application will check the CI that has the indicated MIB and will automatically update the assets with the collected information.
❌ DANGER!
1. Layout files can have any name. All files in the folder will be interpreted, so there can only be XML files inside it; 2. If there is more than one layout, it can be placed within the same file or in different files. It's only necessary to respect the XML format;
💡 Tip:
1. http://www.oidview.com/mibs/ - Repository containing thousands of MIBs separated by the manufacturers. 2. http://ireasoning.com/mibbrowser.shtml - MibBrowser tool that can assist in OID collection.