Get particular information of hwinfo (like: nsversion or hwdescription)
Gregger83 opened this issue · 1 comments
Gregger83 commented
Is it possible, to fetch one particular value of hwinfo like nsversion or hwdescription?
slauger commented
Hi,
sorry for the late response. Somehow i missed the email notification for this issue.
Currently the hwinfo
command can not be limited to specific infos. Still you can use the -v
switch to check wich APIs calls are running in the backround and get the infos directly with cURL.
-bash$ ./check_netscaler.pl -H 10.0.0.240 -C hwinfo -v
debug: target url is http://10.0.0.240/nitro/v1/config/nshardware
debug: target url is http://10.0.0.240/nitro/v1/config/nsversion
NetScaler OK - hwinfo: Platform: NetScaler Virtual Appliance 450010; ....
-bash$ curl -u nsroot http://10.0.0.240/nitro/v1/config/nsversion
Enter host password for user 'nsroot':
{ "errorcode": 0, "message": "Done", "severity": "NONE", "nsversion": { "installedversion": false, "version": "NetScaler NS13.0: Build 71.44.nc, Date: Dec 26 2020, 11:31:14 (64-bit)", "mode": "1" } }
Feel free to submit a merge request.