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 | 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]