Thanks for your help, exactly what I was looking for

Best Regards, Amitay.
__________________

-----Original Message-----
From: Catalin Farcasanu [mailto:[email protected]] 
Sent: Thursday, August 27, 2015 11:30 AM
To: spectrum
Cc: Amitay Ben-ishay
Subject: RE: [spectrum] Getting the parent IP address

Hi Amitay,

I'm not sure I understand correctly your problem. You have alarms/alerts that 
are created based on traps that are received from the interfaces.
Those alerts are missing the IP address of the parent device that has this 
interfaces. Is this right?

If so, each interface has an attribute called (Network_Address;0x12d7f) that 
shows the actual ip address of the parent device. You can use this information 
in your SetScript/ClearScript using a definition like this in your files 
PARENT_IP=SANM_0x12d7f.

In the AlarmNotifier User Guide, section Passing CA Spectrum Attributes to 
Scripts it is described how the extra arguments should be used in scripting.

If I did not understand correctly your problem, let me know.

Regards,

CATALIN FARCASANU
Senior Consultant
SolvIT Networks.

-----Original Message-----
From: Amitay Ben-ishay [mailto:[email protected]]
Sent: Thursday, August 27, 2015 7:38 AM
To: spectrum <[email protected]>
Subject: 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]
------------------------------------------------------------
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]

Reply via email to