In order to use IBM flashsytem REST API I need to use username and password to get a token and then use the token for following requests
curl -k -X POST -H 'Content-Type:application/json' -H 'X-Auth-Username:prtgapi' -H 'X-Auth-Password:password' https://storage-device:7443/rest/auth
curl -k -X POST -H 'Content-Type:application/json' -H 'X-Auth-Token:token' https://st-tulsa:7443/rest/lssystemstats
I also created a REST template to get information from my system:
prtg": { "description" : { "device": "IBM flashsystem", "query": ":7443/rest/lssystemstats", "comment": "Documentation is on https://barrywhytestorage.blog/2020/08/03/tips-and-tricks-using-the-spectrum-virtualize-rest-api/" }, "result": [ { "channel": $[0].stat_name , "unit": "%", "value": $[0].stat_current }, { "channel": $[1].stat_name , "unit": "%", "value": $[1].stat_current }, { "channel": $[6].stat_name , "unit": "io", "value": $[6].stat_current }, { "channel": $[7].stat_name , "unit": "Mb", "value": $[7].stat_current }, { "channel": $[10].stat_name , "unit": "Mb", "value": $[10].stat_current }, { "channel": $[11].stat_name , "unit": "io", "value": $[11].stat_current }, { "channel": $[12].stat_name , "unit": "ms", "value": $[12].stat_current }, { "channel": $[37].stat_name , "unit": "W", "value": $[37].stat_current }, { "channel": $[38].stat_name , "unit": "c", "value": $[38].stat_current } ] } }
Add comment