

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Is there a way to combine two device types in one command script?
NA version:10
Thanks,
Trim
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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:
Kind regards,
Traian


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Trim,
You mean connection to two different device types within the same command script ?
Thanks,
Traian


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thank you.
Could you please provide me a sample perl script to do that?
Thanks,
Trim


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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:
Kind regards,
Traian


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
Hector