- Community Home
- >
- Networking
- >
- IMC
- >
- Test SNMP/Telnet/SSH configuration from REST clien...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2016 03:53 AM
тАО05-30-2016 03:53 AM
Test SNMP/Telnet/SSH configuration from REST client
Hi there!
I decided to write a client to access IMC through its REST API, because I need to configure more than 1000 devices for auto-backup, which is a little bit messy to manage with the web interface.
The REST API makes it possible for me to change all the device settings from my command line tool but unfortunately it doesn't seem to support the "Test" option for the SNMP, Telnet and SSH configurations as in the web interface, which is important for this task.
Is there any other quite simple way for me to run these tests from my client? I thought about accessing the IMC host through command line (SSH). How can I achieve this in a good way or which commands do I have to execute? Or did I miss a much simpler solution to my problem?
Thanks in advance and kind regards,
Hannes
- Tags:
- rest api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2016 03:19 PM
тАО05-30-2016 03:19 PM
Re: Test SNMP/Telnet/SSH configuration from REST client
I wonder if there's a different way of approaching the problem? It depends what exactly you want to test.
Do you want to:
- Check that firewalls/routing are in place between IMC & the managed node?
- Check that the SNMP + login type + username/password stored in IMC match what's on the device?
- Check that backups can complete successfully?
If it's only #1, then you could have a script that logs into IMC via SSH, and runs snmpwalk/ssh/ping commands. Ansible would work for this.
In theory #2 should be fine if you're managing your configurations + IMC well, but yes, it is good to test. So maybe you could approach it in a different way. To test SNMP, is there some API call you can make that validates that you're getting information back from the device? e.g. request the serial number via API, or something like that (see https://kontrolissues.net/2016/04/11/serial-numbers-how-i-love-thee/)
Similarly, to check login type + user/pass settings, maybe by running a simple command on the device (show version, or something similar). That would test that connectivity + authentication is OK. See this for an example: https://kontrolissues.net/2016/02/14/deploying-code-to-devices-through-your-nms/
The other option is to make sure that backup failure reporting is configured. So your process is to configure the devices in IMC, set up the backup plan, then wait for the failure reports.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2016 04:57 AM
тАО06-14-2016 04:57 AM
Re: Test SNMP/Telnet/SSH configuration from REST client
Thank you for the detailed answer!
Do you want to [...] Check that the SNMP + login type + username/password stored in IMC match what's on the device?
In principle yes, but it's the other way round. So I actually want to check that e.g. SSH or SNMP read-write is configured on the device itself. Many of our devices don't have everything, that is necessary for doing the backups, configured properly.
To test SNMP, is there some API call you can make that validates that you're getting information back from the device?
Not really. API calls only query IMC's database. I can check if there has already been some successful SNMP communication but not if new parameters (e.g. for SNMP write access) work or not.
I decided to SSH onto the IMC host and run test commands/scripts there from within my program. It works well and it wasn't that complicated to implement. However it would be very useful to have such testing capabilities in the REST API.
In the end, of course, the backup history is the final information about successful backups, as you mentioned.
Thanks and regards