Unsolved
32 Posts
0
2102
ScaleIO SCLI or RESTAPI to get existing alerts
Hi there,
Is there any existing SCLI or RESTAPI to retrieve SCaleIO existing alerts which show up in GUI. Or any log files which scan to see the same information?
Thank you,
RItu
andyinv
37 Posts
0
October 16th, 2018 01:00
Hi
If you take a look at the REST API documentation, there's a few counters you could consume. You could use Postman to find your way around the objects and counters (eg mdmCluster.ClusterState). Also, I wrote a script to query the REST API for stats, some of which would expose errors (for example, if a rebuild was in effect, it would show up as throughput).
You can take a look at it here: https://github.com/lansalot/vxflex-scaleio2influx
Some useful queries I ran when trying to work my way around are below, if you splice them into the above code, you'll see what comes out that's interesting:
#Invoke-ScaleIORestMethod -Gateway $Gateway -URI "/api/instances"
Invoke-ScaleIORestMethod -Gateway $Gateway -URI "/api/types/System/instances"
# Invoke-ScaleIORestMethod -Gateway $Gateway -URI "/api/instances/System::yourGUIID/relationships/Sdc"
#Invoke-ScaleIORestMethod -Gateway $Gateway -URI "/api/instances/Sdc::yourGUIID/relationships/Statistics"
#Invoke-ScaleIORestMethod -Gateway $Gateway -URI "/api/instances/Sdc::yourGUIID/relationships/Volume"
#Invoke-ScaleIORestMethod -Gateway $Gateway -URI "/api/instances/Volume::6bab1ae900000003/relationships/Statisticss"
# Invoke-ScaleIORestMethod -Gateway $Gateway -URI "/api/instances/StoragePool::yourPoolID/relationships/Volume"
#Invoke-ScaleIORestMethod -Gateway $Gateway -URI "/api/instances/StoragePool::yourPoolID"
Hope this gives some useful pointers.
A