BMC Atrium Discovery Community Forum

This forum is now closed. Please check sticky posts and announcements for further information.

Links to new community:

forgot password?
   
1 of 3
1
SNMP pattern HP Blade Chassis
Posted: 21 March 2012 07:42 PM   [ Ignore ]  
RankRankRank
Contributor
Total Posts:  44
Joined:  2010-02-01

Hi all,

Was anyone successful to create a SNMP pattern to get additional details from non-Host node devices (like Blade Chassis) using ADDM 8.3.1?

We created the pattern below, it runs, but there is no data in either DiscoveredSNMP or DeviceInfo node. Thank you for any help !

// HP C7000 Blade Chassis

   
tpl 1.6 module WF_BladeChassis_HPBlade_Augment;


 
table HPBlade_oids 1.0
   
"1.3.6.1.4.1.232.22.2.3.1.1.8" -> "wf_name"//NAME
   
"1.3.6.1.4.1.232.22.2.3.1.1.2" -> "wf_nic_model"//MODEL
   
"1.3.6.1.4.1.232.22.2.3.1.1.7" -> "wf_firmware"//FIRMWARE
  
end table;

  
pattern WF_BladeChassis_HPBlade_Augment 1.0
   
"""
   Builds VIP using snmp to get basic details on the HPBlade.
   """

   
overview
     tags HP
,c7000;
   
end overview;

   
triggers
     on deviceinfo 
:= DeviceInfo created where capability_types ='Blade System' and vendor 'HP';
   
end triggers;

   
body
       
wf_name 
:= discovery.snmpGet(deviceinfoHPBlade_oids);
device_info_node._tw_meta_data_attrs := ['wf_name'];
               
wf_nic_model := discovery.snmpGet(deviceinfoHPBlade_oids);
device_info_node._tw_meta_data_attrs := ['wf_nic_model'];
               
wf_firmware := discovery.snmpGet(deviceinfoHPBlade_oids);
device_info_node._tw_meta_data_attrs := ['wf_firmware'];
     
   
end body;
  
end pattern
[ Edited: 23 March 2012 06:42 PM by Andrew Waters]
Profile
 
 
Posted: 22 March 2012 06:24 AM   [ Ignore ]   [ # 1 ]  
BMC ADDM Staff
RankRankRankRank
Administrator
Total Posts:  2089
Joined:  2008-02-12

This is not how discovery.snmpGet works.

Given

table HPBlade_oids 1.0
  
"1.3.6.1.4.1.232.22.2.3.1.1.8" -> "wf_name";      // NAME
  
"1.3.6.1.4.1.232.22.2.3.1.1.2" -> "wf_nic_model"// MODEL
  
"1.3.6.1.4.1.232.22.2.3.1.1.7" -> "wf_firmware”"// FIRMWARE
end table

then

result := discovery.snmpGet(deviceinfoHPBlade_oids); 

on success will return a node with an attribute for each SNMP request, i.e. result.wf_name will contain the result of the name OID, result.wf_nic_model the model OID and result.wf_firmware the firmware OID.

You MUST not modify DDD nodes, the system believes they will never be modified. Changing the content of DDD nodes WILL break things.

What is in the DiscoverySNMP node?

Profile
 
 
Posted: 23 March 2012 05:30 PM   [ Ignore ]   [ # 2 ]  
RankRankRank
Contributor
Total Posts:  44
Joined:  2010-02-01

Hello Andrew,

Thank you very much for the prompt reply. I have modified the pattern but still do not see any results in ADDM. Not sure what I am doing wrong. Thank you for any suggestions!!!
Here is the pattern:

// HP C7000 Blade Chassis

   
tpl 1.6 module WF_BladeChassis_HPBlade_Augment;

// table HPBlade_oids 1.0
//   "8" -> "wf_name"; //NAME
//   "2" -> "wf_nic_model"; //MODEL
//   "7" -> "wf_firmware"; //FIRMWARE
//  end table;

table HPBlade_oids 1.0
  
"1.3.6.1.4.1.232.22.2.3.1.1.8" -> "wf_name";      // NAME
  
"1.3.6.1.4.1.232.22.2.3.1.1.2" -> "wf_nic_model"// MODEL
  
"1.3.6.1.4.1.232.22.2.3.1.1.7" -> "wf_firmware”"// FIRMWARE
end table;

  
pattern WF_BladeChassis_HPBlade_Augment 1.0
   
"""
   Builds VIP using snmp to get basic details on the HPBlade.
   """

   
overview
     tags HP
,c7000;
   
end overview;

   
triggers
     on deviceinfo 
:= DeviceInfo created where capability_types ='Blade System' and vendor 'HP';
   
end triggers;

   
body
      

//    result := discovery.snmpGetTable(device_info_node, "1.3.6.1.4.1.232.22.2.3.1.1", HPBlade_oids);
    
        
result := discovery.snmpGet(deviceinfoHPBlade_oids);
     
              
wf_name := result.wf_name;
//              device_info_node._tw_meta_data_attrs := ['wf_name'];
               
           
wf_nic_model := result.wf_nic_model;
//               device_info_node._tw_meta_data_attrs := ['wf_nic_model'];
               
            
wf_firmware := result.wf_firmware;
//               device_info_node._tw_meta_data_attrs := ['wf_firmware'];
     
   
end body;
  
end pattern
[ Edited: 23 March 2012 06:42 PM by Andrew Waters]
Profile
 
 
Posted: 23 March 2012 06:47 PM   [ Ignore ]   [ # 3 ]  
BMC ADDM Staff
RankRankRankRank
Administrator
Total Posts:  2089
Joined:  2008-02-12

Is there any SNMP request listed on the DiscoveryAccess page for such a chassis (it would be under Additional Discovery)?

If there is no such node the pattern is not triggering. If there is a node then it will either have the discovered OIDs or a failure reason.

Profile
 
 
Posted: 26 March 2012 07:12 PM   [ Ignore ]   [ # 4 ]  
RankRankRank
Contributor
Total Posts:  44
Joined:  2010-02-01

Yes Andrew, we see the success under the Additional Discovery for getSNMPValues.
And when we open the link we see the details:

Discovery Method   getSNMPValues
Discovery Duration   0 seconds
Request Time   26/03/2012 12:56
Object Identifiers   1.3.6.1.4.1.232.22.2.3.1.1.2, 1.3.6.1.4.1.232.22.2.3.1.1.7, 1.3.6.1.4.1.232.22.2.3.1.1.8
Discovery Access   ip @ 2012-03-26 12:55:45.79
Requesting Pattern   WF_BladeChassis_HPBlade_Augment.WF_BladeChassis_HPBlade_Augment
Access Method   SNMP v2c
Method Success   SNMP Queries

But how do we query the actual data returned?
When I run the query “Search NetworkDevice PROCESS WITH SHOW name, type, vendor, model, wf_model, wf_name, wf_firmware” there are no results for any of the wf_x attributes. Unless I am doing something wrong. Again, here is the pattern we ran:

// HP C7000 Blade Chassis

   
tpl 1.6 module WF_BladeChassis_HPBlade_Augment;

// table HPBlade_oids 1.0
//   "8" -> "wf_name"; //NAME
//   "2" -> "wf_nic_model"; //MODEL
//   "7" -> "wf_firmware"; //FIRMWARE
//  end table;

table HPBlade_oids 1.0
  
".1.3.6.1.4.1.232.22.2.3.1.1.8" -> "wf_name";      // NAME
  
".1.3.6.1.4.1.232.22.2.3.1.1.2" -> "wf_nic_model"// MODEL
  
".1.3.6.1.4.1.232.22.2.3.1.1.7" -> "wf_firmware"// FIRMWARE
end table;

pattern WF_BladeChassis_HPBlade_Augment 1.0
   
"""
   Builds VIP using snmp to get basic details on the HPBlade.
   """

   
overview
     tags HP
,c7000;
   
end overview;

   
triggers
     on device
:= NetworkDevice createdconfirmed where vendor matches 'HP';
   
end triggers;

   
body
   log
.info("HB Blade Chassis Augment pattern executing");


   
result := discovery.snmpGet(deviceHPBlade_oids);

   if 
result then
   log
.info("****NODE DATA FOUND****");
   
device.wf_name := result.wf_name;
   
log.info("****%result.wf_name%****");
   
device.wf_nic_model := result.wf_nic_model;
   
log.info("****%result.wf_nic_model%****");
   
device.wf_firmware := result.wf_firmware;
   
log.info("****%result.wf_firmware%****");
   else
   
log.info("SNMP DATA NOT RETURNED");
   
end if;
     
   
end body;
end pattern

We enabled additional logging, and when executing the pattern no values are displayed in log.info output. When our engineer runs a Perl script using the OIDs from the pattern, he gets the data back. So not sure where to go from here.
As always, thank you very much for all help !

[ Edited: 27 March 2012 05:16 AM by Andrew Waters]
Profile
 
 
Posted: 27 March 2012 05:40 AM   [ Ignore ]   [ # 5 ]  
BMC ADDM Staff
RankRankRankRank
Administrator
Total Posts:  2089
Joined:  2008-02-12

Are the values showing on the Additional Discovery for getSNMPValues? If not then SNMP is not returning the values.

As mention previously in the forums, in ADDM 8.2.x and 8.3.x manual pattern execution will only works with Hosts. This should be fixed in Xenolith pre-release 1.

Profile
 
 
Posted: 11 June 2013 07:14 AM   [ Ignore ]   [ # 6 ]  
RankRankRankRank
Guru
Total Posts:  169
Joined:  2012-11-09

Thought I would merge this one with my triggering pattern here

Profile
 
 
Posted: 01 July 2013 07:31 AM   [ Ignore ]   [ # 7 ]  
RankRankRankRank
Guru
Total Posts:  169
Joined:  2012-11-09

Hello everyone.

Did anyone manage to get Blade Enclosure discovery over SNMP?
Thought direct approach is much more reliable, because blade servers could have no OS running or credentials/ports valid.

I going to contribute my humble experience to this task.
Point to get is - Enclosure, firmware, number of blades, empty/occupied bays, serials of blades and chassis, relations of blades to chassis, relations to network cards..
In other words - make this thing alive.
Data could be collected over SNMP v2c as it already gathered by SNMP device capture of Onboard Administrator starting from firmware version 3.60(july 2012).

Profile
 
 
Posted: 04 July 2013 07:06 AM   [ Ignore ]   [ # 8 ]  
RankRankRankRank
Guru
Total Posts:  169
Joined:  2012-11-09

Attached proper TPL to get firmware version. Work well on ADDM 9.01. TKU 2013-06.

Going to trigger Host Container based on Version of firmware(SNMP v2c MIB).

File Attachments
HP_Blade_Enclosure_firmware_DiscoveredSNMPget_node+.tpl  (File Size: 4KB - Downloads: 648)
Profile
 
 
Posted: 08 July 2013 11:10 AM   [ Ignore ]   [ # 9 ]  
RankRankRankRank
Guru
Total Posts:  169
Joined:  2012-11-09

Imagine you would do it, what would be the logic of that pattern?

I only can think like this:

1 find out basic info about enclosure itself: Model, Serial, Firmware version, IP address(network information), .
2 find out capacity information: number of bays, X and Y size, power information may be.
3 need to list bays so later we can gather information about each of them: list of occupied bays by numbers
4 run cycle of requests for each bay and store information in separated nodes. model, serial, bay number, size(possible), network information, (firmware?).
5 need to relate discovered blades to discovered hosts by serial number. there could be unpowered blades or blades without accessible OS, but this does not mean there are no blade server.

What else could be useful and not so hard for modeling?

Profile
 
 
Posted: 10 July 2013 02:03 PM   [ Ignore ]   [ # 10 ]  
RankRankRankRank
Guru
Total Posts:  169
Joined:  2012-11-09

Colleagues,

Here are raw pattern for Blade Enclosure discovered from Onboard Administrator over SNMP.

Problem found - it won’t list all additional details below, only replacing them one by one.
Hint needed.

File Attachments
HCFB_HP_Blade_Enclosure_SNMP_Chassis_Node.tpl  (File Size: 9KB - Downloads: 564)
Profile
 
 
Posted: 10 July 2013 09:15 PM   [ Ignore ]   [ # 11 ]  
RankRank
Member
Total Posts:  32
Joined:  2011-08-15

Hi,

inspired by this post I also stated working on a pattern for enclosures but what I would like to get is also the link to servers in the enclosure.
With this pattern I get the serial number as well as the server name back from the enclosure. But how can I link e.g. a server based on the serial number to the enclosure in order to get this relation in the CMDB?
I also still have problems that the “Unknown” so empty slot are returned even after I tried to exclude them with the if statement.

tpl 1.6 module DataCenter_Enclosure;

 
table server_map 1.0
"3" -> "Slot";
"4" -> "Server";
"16" -> "Server_Serial";
end table;
     
  
pattern DataCenter_Enclosure_Server 1.0
   
"""
   
   """

   
overview
     tags HP
,c7000;
   
end overview;

triggers
     on HPOA 
:= NetworkDevice createdconfirmed where (vendor matches 'Hewlett-Packard'  and model matches 'Onboard Administrator');
   
end triggers;

   
body
     


Server_Inside 
:= discovery.snmpGetTable(HPOA"1.3.6.1.4.1.232.22.2.4.1.1.1"server_map);

for 
n in  Server_Inside do
log.info("\n n = %n% \r");
      if 
not n.Server matches regex 'Unknown'  then
            HPOA
.:= n;
            
log.info("\n HPOA.n = %HPOA.n% \r");
    
end if;
                        
end for;

   
end body;
  
end pattern
Profile
 
 
Posted: 11 July 2013 07:10 AM   [ Ignore ]   [ # 12 ]  
RankRankRankRank
Guru
Total Posts:  169
Joined:  2012-11-09

My intent was to create hardware blade servers as details of blade chassis.
Then relate blade servers to discovered hosts with matching serial number. Also list matching discovered hosts as Members within Enclosure.

Thought we should start from

cpqRackServerBladePresent 1.3.6.1.4.1.232.22.2.4.1.1.1.12
This specifies if the server blade described is present in the enclosure.
OBJECT-TYPE    
  INTEGER other(1), absent(2), present(3) 

.
And use

cpqRackServerEnclosureMaxNumBlades 1.3.6.1.4.1.232.22.2.3.2.1.1.4
The maximum number of server blades the enclosure can contain. The string will be empty if the enclosure does not report the name or it could not be determined.
OBJECT-TYPE    
  INTEGER  

as counter.

Then we can address MIB request to just blades that exist in bays.

Will appreciate if some1 could correct me in “FOR” blades listing part of attached TPL.

Next part should be search in Hosts where Serial Number match bladeserver.serialnum.

[ Edited: 11 July 2013 02:26 PM by Andrey Andreev]
File Attachments
HCFB_HP_Blade_Enclosure_SNMP_Chassis_Node.tpl  (File Size: 14KB - Downloads: 838)
Profile
 
 
Posted: 16 July 2013 08:47 PM   [ Ignore ]   [ # 13 ]  
RankRank
Member
Total Posts:  32
Joined:  2011-08-15

I had a look on your pattern and I think the trigger in the second part does not really work. I would trigger on the onboard administrator and try to relate the discoverd blade server to the created chassie.  was wondering if you can set a variable with something like chassie = search hostcontainer where managedby = hpao.name show name and set the relation…. really tricky!

Profile
 
 
Posted: 18 July 2013 01:02 PM   [ Ignore ]   [ # 14 ]  
RankRankRankRank
Guru
Total Posts:  169
Joined:  2012-11-09
Ramon Stockmann - 16 July 2013 08:47 PM

I had a look on your pattern and I think the trigger in the second part does not really work. I would trigger on the onboard administrator and try to relate the discoverd blade server to the created chassie.  was wondering if you can set a variable with something like chassie = search hostcontainer where managedby = hpao.name show name and set the relation…. really tricky!

Was wandering about that tricky thing too.

There seem to be a problem - we can only search for exist relationship for triggered node. And it will only be SNMP managed device or HostContainer.

Profile
 
 
Posted: 18 July 2013 01:15 PM   [ Ignore ]   [ # 15 ]  
BMC ADDM Staff
RankRankRankRank
Administrator
Total Posts:  2089
Joined:  2008-02-12
Andrey Andreev - 18 July 2013 01:02 PM

There seem to be a problem - we can only search for exist relationship for triggered node. And it will only be SNMP managed device or HostContainer.

TPL allows you to search the complete datastore there is no such limitation. You need to be careful in searching the complete datastore to ensure that your searches are not overly expensive when there are a lot of nodes.

Profile
 
 
   
1 of 3
1