Absent Member.. Absent Member..
Absent Member..
451 views

command script

Jump to solution

Is there a way to combine two device types in one command script?

 

NA version:10

 

 

Thanks,

Trim

0 Likes
1 Solution

Accepted Solutions
Admiral Admiral
Admiral

Hello,

 

I'm afraid we don't have such script but you could generate a simple Perl script for a device and then modify that one to create a second device connection.

To generate a perl script in NA:

- select a device in NA and connect to it "Via Proxy Using Telnet" or "Via Proxy Using SSH" using the Connect menu from device page

- issue a simple command on the device and exit

- go to View - Telnet/SSH Sessions - click on "View Full Telnet/SSH Session" - click on "Convert to Perl script"- save the script

 

Also, thre are some NA Perl scripts examples that could help you in NA/client/perl_api/demo/.

If you haven't worked before with NA API I suggest you have a look at this document first:

 

https://softwaresupport.hp.com/group/softwaresupport/search-result?p_p_id=facetsearch_WAR_hpospportlet&p_p_lifecycle=2&p_p_mode=view&p_p_resource_id=downloadFile&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&_facetsearch_WAR_hpospportlet_contentId=cid%3A552d4dab0007010e80aa7978&_facetsearch_WAR_hpospportlet_fileName=hp_man_NA_api_user_guide_10.00_pdf.pdf&_facetsearch_WAR_hpos...

 

Kind regards,

Traian

View solution in original post

7 Replies
Admiral Admiral
Admiral

Hi Trim,

 

You mean connection to two different device types within the same command script ?

 

Thanks,

Traian

0 Likes
Absent Member.. Absent Member..
Absent Member..
yes..
0 Likes
Admiral Admiral
Admiral

With a regular NA command script that won't work as the driver doesn't know how to handle two different device connections.  However, through an advanced command script (Perl, Expect, etc) you can connect to different devices and process various data, these scripts don't depend on a specific device driver.

 

Regards,

Traian

0 Likes
Absent Member.. Absent Member..
Absent Member..

Thank you.

 

Could you please provide me a sample perl script to do that?

 

Thanks,

Trim

0 Likes
Admiral Admiral
Admiral

Hello,

 

I'm afraid we don't have such script but you could generate a simple Perl script for a device and then modify that one to create a second device connection.

To generate a perl script in NA:

- select a device in NA and connect to it "Via Proxy Using Telnet" or "Via Proxy Using SSH" using the Connect menu from device page

- issue a simple command on the device and exit

- go to View - Telnet/SSH Sessions - click on "View Full Telnet/SSH Session" - click on "Convert to Perl script"- save the script

 

Also, thre are some NA Perl scripts examples that could help you in NA/client/perl_api/demo/.

If you haven't worked before with NA API I suggest you have a look at this document first:

 

https://softwaresupport.hp.com/group/softwaresupport/search-result?p_p_id=facetsearch_WAR_hpospportlet&p_p_lifecycle=2&p_p_mode=view&p_p_resource_id=downloadFile&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&_facetsearch_WAR_hpospportlet_contentId=cid%3A552d4dab0007010e80aa7978&_facetsearch_WAR_hpospportlet_fileName=hp_man_NA_api_user_guide_10.00_pdf.pdf&_facetsearch_WAR_hpos...

 

Kind regards,

Traian

View solution in original post

Absent Member.. Absent Member..
Absent Member..

Hi HP Expert,

 

I have 3 questions related to HPNA-

 

1) whenever anyone issue "any any" access-list on firewall, we need that notification on mail with username.

 

2) I am getting so much changes in HPNA with Changed By Name "NA", why it is not showing username.

 

3) We just want to run a command like "sh ip int brief" on cisco switch and need that output on mail.

 

 

0 Likes
Commodore Commodore
Commodore

Hi Ashish,

 

For (1),  if you are using NA enterprise, you can create a recurrent policy to verify your device target and be sure "any any" is not part of those devices.  Results can be sent by mail.

 

For (2), in Admin -> Configuration Mgmt; there's an option to add user regex filters.  There's a change user information from syslog messages are not properly parsed.    If after adding the user regext the issue persists, open a support case about it can be a good option.

 

For (3),  please review Paul's recommendation.

 

 

Hope it helps.

Kind Regards,
Hector
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.