Start a Conversation

Unsolved

This post is more than 5 years old

1411

December 23rd, 2012 23:00

Create host and assign IP

Hello Team,

I have list of device names and IP address in two seperate files which i am calling in custom-end-system.asl.

I have created host as below and now all host has been created but there is no ip address and SNMPAddress is also greyed out.

How can I assign SNMP address to all those hosts.

device1 = Special_Host1

  HostObj = object("Host", device1);

                if ( HostObj->isNull() ) {

                        HostObj = create("Host", device1);

                        }

I am trying to assign SNMPAddress as below but it's not working for me..

ipaddress = xx.xx.xx.xx

                        HostObj->insert("SourceAddress", ipaddress);

Thanks             

19 Posts

December 26th, 2012 18:00

Any suggestion will be appreciated........

170 Posts

December 28th, 2012 04:00

Hi Arbas,

Can you please give me some more details on why you are attempting to add the device in this manner?

The issue with adding a device as you are attempting, is that the IP address used to communicate with the device needs to the configured in the SNMPAgent instance which is created automatically when you add a new device to Smarts IP using the standard methods (Seed file, Auto-discovery or Manually via the Console GUI). When you add the device using the method above, the SNMPAgent instance for this device is never created.

The SNMPAgent instance has a HostedBy relationship with its parent device.

When Smarts IP is discovering a device which has been added using standard methods, an SNMPAgent instance is created and a list of IP addresses is generated which Smarts IP may use to communicate with the device (this is the AgentAddressList attribute of the SNMPAgent). One of these addresses is then chosen at the AgentAddress and is used when SNMP Polling the device. If this IP address becomes unavailable for some reason, another IP address from the AgentAddressList is chosen instead. This ensures that the device is not marked as Down until all IP addresses have stopped responding.

As a possible workaround, you can add a device to Smarts IP via the command line, using the following command :

sm_tpmgr -s INCHARGE-AM-PM --add-agent= --community=public

Kind Regards,

Paul O'Rourke

19 Posts

December 31st, 2012 02:00

Hello Paul,

Thanks for the response.

In our environment there are few device which are responding to more than 1 SNMP address . SO Idea is to create
different host and get the Host down alarm instead of interface down.

Thanks for the workaround...Could you please advice can we use this method in custom-end-system.asl.

e.g..


  if ( HostObj->isNull() ) {
                     //   HostObj = create("Host", ipaddress);
        /opt/InCharge/SAM/smarts/bin/sm_tpmgr -s APM --add-agent=ipaddress --community=XXXXX
                        }

Wish you Happy and Prosperous Year ahead....

Thanks & Regards,

Arbass

170 Posts

January 3rd, 2013 05:00

Hi Arbas,

It is not possible to add a device in the custom-end-system.asl script using the above syntax. The command I provided is to be used from the command line.

Smarts IP is designed to handle devices with multiple IP addresses which can be used for SNMP and ICMP communication. This is a key component of generating an accurate topology for Root Cause Analysis.

Smarts IP will automatically detect devices which have been added to Smarts IP more than once and also to detect duplicate IP addresses in the environment.

Therefore, if you add a device more than once, even using different IP addresses, during discovery Smarts IP will detect that this device is already in the topology and a second instance of the device will not be created.

A host down notification for an ICMPSNMP host will not be generated unless all IP addresses stop responding.

This is to prevent false Down notifications.

Interface Status is monitored via SNMP and a notification will be generated if an interface is detected as Down.

If you are only interested in monitoring the ICMP connectivity, one option is to add each IP address to Smarts IP as a ICMPONLY host. IP will not attempt to SNMP discover these IP addresses and only monitor them for responsiveness via ICMP (ping). However, this will limit the RCA of Smarts IP as the device in question will not be discovery using SNMP.

Please let me know if you have any additional questions.

Kind Regards,

Paul O'Rourke

No Events found!

Top