Tutorial: NMIS8, create a new model (continuation)
1. Overview
In this tutorial, we will extending the model initially created for the Tutorial: NMIS8, create a new model.
To obtain useful data to be used on the model.
Add new metrics.
Add new graphs.
Add new thresholds.
What you’ll need
Our Opmantek Virtual Appliance (VM) from Opmantek.com
You must have done the previous tutorial (Tutorial: NMIS8, create a new model)
2. Set up your environment
For this tutorial, my NMIS8 environment is using 192.168.1.100, this IP address may be different on your set up.
You need to access the VM via SSH to edit the configuration files, the default credentials for the VM are:
username: root
password: NM1$88
Important
It is important to verify the syntax of the edited files, remember to use: perl -c filename after saving the changes.
Important
Opmantek VM has SNMPv2c enabled by default, the community used on this VM is: nmisGig8
This can be verified on the snmp configuration file that can be found in /etc/snmpd/snmpd.conf
3. Objects to monitor
As we have seen in the previous tutorial, we need to obtain the relevant information about the objects to model it for the device. We could get these details directly from the vendor or if the objects are more common, we can search online to obtain more details about them. In this case, we need to model relevant Objects from the Mib 2 - IP MIB Group 1.3.6.1.2.1.4 iso(1). org(3). dod(6). internet(1). mgmt(2). mib-2(1). ip(4).
IP | GROUP | 1.3.6.1.2.1.4 iso(1). org(3). dod(6). internet(1). mgmt(2). mib-2(1). ip(4) | ||||
ipForwarding | SCALAR | read-write | INTEGER | 1.3.6.1.2.1.4.1 | ||
ipDefaultTTL | SCALAR | read-write | INTEGER | 1.3.6.1.2.1.4.2 | ||
ipInReceives | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.3 | ||
ipInHdrErrors | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.4 | ||
ipInAddrErrors | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.5 | ||
ipForwDatagrams | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.6 | ||
ipInUnknownProtos | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.7 | ||
ipInDiscards | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.8 | ||
ipInDelivers | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.9 | ||
ipOutRequests | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.10 | ||
ipOutDiscards | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.11 | ||
ipOutNoRoutes | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.12 | ||
ipReasmTimeout | SCALAR | read-only | INTEGER | 1.3.6.1.2.1.4.13 | ||
ipReasmReqds | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.14 | ||
ipReasmOKs | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.15 | ||
ipReasmFails | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.16 | ||
ipFragOKs | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.17 | ||
ipFragFails | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.18 | ||
ipFragCreates | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.19 | ||
ipAddrTable | TABLE | not-accessible | SEQUENCE OF | 1.3.6.1.2.1.4.20 | ||
| ipAddrEntry | ENTRY | not-accessible | IpAddrEntry | 1.3.6.1.2.1.4.20.1 | |
| ipAdEntAddr | TABULAR | read-only | IpAddress | 1.3.6.1.2.1.4.20.1.1 | |
ipAdEntIfIndex | TABULAR | read-only | INTEGER | 1.3.6.1.2.1.4.20.1.2 | ||
ipAdEntNetMask | TABULAR | read-only | IpAddress | 1.3.6.1.2.1.4.20.1.3 | ||
ipAdEntBcastAddr | TABULAR | read-only | INTEGER | 1.3.6.1.2.1.4.20.1.4 | ||
ipAdEntReasmMaxSize | TABULAR | read-only | INTEGER ( 0..65535 ) | 1.3.6.1.2.1.4.20.1.5 | ||
ipRouteTable | TABLE | not-accessible | SEQUENCE OF | 1.3.6.1.2.1.4.21 | ||
| ipRouteEntry | ENTRY | not-accessible | IpRouteEntry | 1.3.6.1.2.1.4.21.1 | |
| ipRouteDest | TABULAR | read-write | IpAddress | 1.3.6.1.2.1.4.21.1.1 | |
ipRouteIfIndex | TABULAR | read-write | INTEGER | 1.3.6.1.2.1.4.21.1.2 | ||
ipRouteMetric1 | TABULAR | read-write | INTEGER | 1.3.6.1.2.1.4.21.1.3 | ||
ipRouteMetric2 | TABULAR | read-write | INTEGER | 1.3.6.1.2.1.4.21.1.4 | ||
ipRouteMetric3 | TABULAR | read-write | INTEGER | 1.3.6.1.2.1.4.21.1.5 | ||
ipRouteMetric4 | TABULAR | read-write | INTEGER | 1.3.6.1.2.1.4.21.1.6 | ||
ipRouteNextHop | TABULAR | read-write | IpAddress | 1.3.6.1.2.1.4.21.1.7 | ||
ipRouteType | TABULAR | read-write | INTEGER | 1.3.6.1.2.1.4.21.1.8 | ||
ipRouteProto | TABULAR | read-only | INTEGER | 1.3.6.1.2.1.4.21.1.9 | ||
ipRouteAge | TABULAR | read-write | INTEGER | 1.3.6.1.2.1.4.21.1.10 | ||
ipRouteMask | TABULAR | read-write | IpAddress | 1.3.6.1.2.1.4.21.1.11 | ||
ipRouteMetric5 | TABULAR | read-write | INTEGER | 1.3.6.1.2.1.4.21.1.12 | ||
ipRouteInfo | TABULAR | read-only | OBJECT IDENTIFIER | 1.3.6.1.2.1.4.21.1.13 | ||
ipNetToMediaTable | TABLE | not-accessible | SEQUENCE OF | 1.3.6.1.2.1.4.22 | ||
| ipNetToMediaEntry | ENTRY | not-accessible | IpNetToMediaEntry | 1.3.6.1.2.1.4.22.1 | |
| ipNetToMediaIfIndex | TABULAR | read-write | INTEGER | 1.3.6.1.2.1.4.22.1.1 | |
ipNetToMediaPhysAddress | TABULAR | read-write | PhysAddress | 1.3.6.1.2.1.4.22.1.2 | ||
ipNetToMediaNetAddress | TABULAR | read-write | IpAddress | 1.3.6.1.2.1.4.22.1.3 | ||
ipNetToMediaType | TABULAR | read-write | INTEGER | 1.3.6.1.2.1.4.22.1.4 | ||
ipRoutingDiscards | SCALAR | read-only | Counter | 1.3.6.1.2.1.4.23 | ||
Now get the devices snmp data using snmpwalk. We will request data from the OID:
$ snmpwalk -v 2c -c nmisGig8 192.168.1.100 1.3.6.1.2.1.4To make the returned data more useful and easier to interprete, we put the results in a table that shows the OID, the numerical OID and the value.
OID | Numerical OID | Value |
IP-MIB::ipForwarding.0 | .1.3.6.1.2.1.4.1.0 | INTEGER: 2 |
IP-MIB::ipDefaultTTL.0 | .1.3.6.1.2.1.4.2.0 | INTEGER: 64 |
IP-MIB::ipInReceives.0 | .1.3.6.1.2.1.4.3.0 | Counter32: 1137737 |