Technical Blog Post
Abstract
Extra! Read all about it! ExtraDetails agent customization!
Body
With IBM Tivoli Network Manager IP the text based discovery agent 'ExtraDetails' can be customized to collect additional mib information for snmp capable devices. The documentation on this agent and other task specific agents is located here
ITNM 3.9 documentation for discovery agents
To modify this agent for use, simply copy the agent
$PRECISION_HOME/disco/agents directory
copy ExtraDetails.agnt to ExtraDetails.DOMAIN.agnt
The agent is broken down into two sections
DiscoAgentMediationLayer - mibs that will be collected
DiscoAgentProcessingLayer - processing or tagging the mibs to be placed in discovery
By default the agent will attempt to collect and add the following mibs to ExtraDetails returns in discovery
sysLocation
sysContact
sysUpTime
sysServices
ifNumber
Checking service disco for one single device, the ExtraDetails.returns might look like this
{
m_UniqueAddress='192.168.0.1';
m_Name='TestServer';
m_ObjectId='1.3.6.1.4.1.311.1.1.3.1.3';
m_Description='Hardware: Intel64';
m_HaveAccess=1;
m_Protocol=1;
m_DownloadFdbData=1;
m_ExtraInfo={
m_IpForwarding=2;
m_SysLocation='In The Lab';
m_SysContact='K Stone';
m_SysUpTime=993784287;
m_SysServices=76;
m_IfNumber=19;
};
m_ManagerId='';
m_UpdAgent='ExtraDetails';
m_LastRecord=1;
m_ReturnTime='2014-04-03 16:53:04';
}
Now I'm interested in picking up the hrStorageDescr mib if it's available. I've chosen this because I'm interested in finding a Serial Number which typically can be found with the Entity agent, but not found for this device and oid.
I create my domain specific ExtraDetails agent file and add an entry for
mediation
DiscoSnmpGetResponse("m_hrStorageDescr", hrStorageDescr)
and processing
DiscoAddTagSnmpGet("m_hrStorageDescr")
and nothing after the next discovery, but an error message in the trace file
ncp_agent.ExtraDetails.PCOM39.trace:CDiscoAgent::DADoPreProcessAgentTag() WARNING: No mediation layer tag information corresponding to dataKey m_hrStorageDescr
Using snmp_walk.pl and closer examination of that mib shows
hrStorageDescr.1 -> A:\
hrStorageDescr.2 -> C:\ Label: Serial Number xyz123
hrStorageDescr.3 -> D:\
hrStorageDescr.4 -> Virtual Memory
hrStorageDescr.5 -> Physical Memory
My interest is the Serial Number, so I must adjust my mediation to account for the last leaf index of that mib.
DiscoSnmpGetResponse("m_hrStorageDescr", hrStorageDescr, "2");
On the next discovery my ExtraDetails agent returns data which has what I want
{
m_UniqueAddress='192.168.0.1';
m_Name='TestServer';
m_ObjectId='1.3.6.1.4.1.311.1.1.3.1.3';
m_Description='Hardware: Intel64 Family 6 ';
m_HaveAccess=1;
m_Protocol=1;
m_DownloadFdbData=1;
m_ExtraInfo={
m_IpForwarding=2;
m_SysLocation='In The Lab';
m_SysContact='K Stone';
m_SysUpTime=992266548;
m_SysServices=76;
m_IfNumber=19;
m_hrStorageDescr='C:\ Label: Serial Number xyz123';
};
m_ManagerId='';
m_UpdAgent='ExtraDetails';
m_LastRecord=1;
m_ReturnTime='2014-04-03 12:40:10';
}
UID
ibm11082433