Hello Amitay, each interface has 2 attributes with ip addresses:
ip_address (0x12dbb) - The ip address of the interface Network_Address (0x12d7f) - ip address of the device (needed for polling) Please check, if the Network_Address attribute on your devices contains the required ip address. The mh of the parent device is stored in the attribute Device_Mdl_Handle(0x10069). Kind Regards Waldemar -- Waldemar Wiesner Geschäftsführer DICOS GmbH Kommunikationssysteme Alsfelder Straße 11 D-64289 Darmstadt T: +49 6151 82787 25 M: +49 1761 82787 25 F: +49 6151 82787 59 W: http://dicos.de PGP key: http://dicos.de/pgpkeys key fingerprint: 6B8F 3A83 5492 A643 E6D5 CFB4 DB2A 8B5C 8731 0A4D DICOS GmbH Kommunikationssysteme, Alsfelder Straße 11, 64289 Darmstadt Sitz der Gesellschaft: Darmstadt, Amtsgericht Darmstadt HRB 7024 Geschäftsführer: Dr. Winfried Geyer, Stephan Hesse, Waldemar Wiesner > -----Ursprüngliche Nachricht----- > Von: Amitay Ben-ishay [mailto:[email protected]] > Gesendet: Donnerstag, 27. August 2015 06:38 > An: spectrum > Betreff: RE: [spectrum] Getting the parent IP address > > Hi, > Thanks for the suggestions. > > As I mention, I want to use it in the setScript of the notifier. > I don't want to make a connect each time - it takes a lot of time since > I need to open a new connect on each relevant alarm > > BTW - in my case the port name has nothing to do with the device name. > > Best Regards, Amitay. > __________________ > > -----Original Message----- > From: wiedel [mailto:[email protected]] > Sent: Wednesday, August 26, 2015 9:55 PM > To: spectrum > Cc: spectrum > Subject: Re: [spectrum] Getting the parent IP address > > Hi Amitay, > I came up with two methods of getting the parent's IP address > from the port name > but neither are very pretty. Both require some parsing. > > Example using port name XYZ-S8.usc.edu_7143 Note that port names are > the name of the parent device with an underbar followed by a port > number. (_7143) > > ***Using CLI: > Prompt> <$SPECROOT>/vnmsh/connect > Prompt> <$SPECROOT>/vnmsh/show models mname=XYZ-S8.usc.edu_7143 | grep > _ > 0x4e5fa7 XYZ-S8.usc.edu_7143 0x220011 Gen_IF_Port > Prompt> <$SPECROOT>/vnmsh/show attributes attr=0x1027f mh=0x4e5fa7 | > Prompt> grep _ > 0x1027f Legacy_Network_Address > 172.16.0.10 > > {The two greps just eliminate the title lines, leaving just the useful > information lines.) You need to extract the first 8 characters of the > output of the "show models" command (0x4e5fa7) to stick in as the model > handle of the second command (show attributes). > > ***Using operating system command: > Start with the port name: XYZ-S8.usc.edu_7143 Chop off the _ and > everything after it. > issue one of several relevant OS commands: > > host XYZ-s8.usc.edu > XYZ-S8.usc.edu has address 172.16.0.10 > > ypmatch xyz-s8.usc.edu hosts > 172.16.0.10 xyz-s8.usc.edu xyz-s8 > > nslookup xyz-s8.usc.edu > Server: xyz-s8.usc.edu > Address: 172.16.0.10 > > Different operating systems use different variants. > > The hard thing here is writing a script that does the parsing of the > commands then extracting the relevant things you need. > > Enjoy! > > > James Wiedel > Director of Network Engineering & Telecommunications University of > Southern California [email protected] > > > > > Amitay Ben-ishay wrote: > > Hi, > > > > Can anyone help with this issue? Or most of you are in vacation? > > > > > > > > Best Regards, Amitay.** > > > > *__________________* > > > > > > > > *From:* Amitay Ben-ishay > > *Sent:* Monday, August 24, 2015 7:18 PM > > *To:* spectrum > > *Subject:* [spectrum] Getting the parent IP address > > > > > > > > Hi all members, > > > > I'm facing an issue regarding interfaces. > > > > Sometimes I get an alarm from an interface itself - this alarm has NO > > IP address since its on the interface. > > > > I would like to get the parent address (device) in my notifier. > > > > How can I get it done? > > > > > > > > Once I used a tool called parent_find which I don't know how I got it > > and it starts to make problem with my SS version so I need to replace > > this solution. > > > > > > > > Best Regards, Amitay.** > > > > *__________________* > > > > *Amitay Ben-Ishay** > > **Senior Software Architecture** **& Product* *Manager*** > > > > cid:[email protected] > > > > > > > > > > > > *Work*: +972-54-7814588 > > *Mobile*:+972-54-9909149 > > > > *Fax*: +972-153-54-9909149 > > > > *Email*: [email protected] > > <mailto:[email protected]> > > > > *LinkedIN*: Amitay's Profile <http://www.linkedin.com/in/amitay> > > > > > > > > P please consider the environment before printing this email** > > > > > > > > > > > > ------------------------------------------------------------ > > This message contains information that may be confidential or > privileged. > > If you are not the intended recipient, you may not use, copy or > > disclose to anyone any of the information in this message. If you > have > > received this message and are not the intended recipient, kindly > > notify the sender and delete this message from your computer. > > > > * --To unsubscribe from spectrum, send email to [email protected] > > <mailto:[email protected]> with the body: unsubscribe spectrum > > [email protected] > > <mailto:[email protected]> > > > > ------------------------------------------------------------ > > This message contains information that may be confidential or > privileged. > > If you are not the intended recipient, you may not use, copy or > > disclose to anyone any of the information in this message. If you > have > > received this message and are not the intended recipient, kindly > > notify the sender and delete this message from your computer. > > > > * --To unsubscribe from spectrum, send email to [email protected] > > <mailto:[email protected]> with the body: unsubscribe spectrum > > [email protected] > > > > --- > To unsubscribe from spectrum, send email to [email protected] with the > body: unsubscribe spectrum [email protected] > ------------------------------------------------------------ > This message contains information that may be confidential or > privileged. > If you are not the intended recipient, you may not use, copy or > disclose to anyone any of the information in this message. If you have > received this message and are not the intended recipient, kindly notify > the sender and delete this message from your computer. > > > --- > To unsubscribe from spectrum, send email to [email protected] with the > body: unsubscribe spectrum [email protected] --- To unsubscribe from spectrum, send email to [email protected] with the body: unsubscribe spectrum [email protected]
