Unsolved
This post is more than 5 years old
37 Posts
0
3566
SCRIPT: Powershell -> ScaleIOREST -> InfluxDB -> Grafana
Hi all
Had time to write a script in Powershell that will continuously poll the ScaleIO REST interface, and push stats to InfluxDB for use with Grafana etc.
Nice and simple, one JSON config file, and a grafana dashboard to import.
Please give it a try and let me know via github if any issues: https://github.com/lansalot/vxflex-scaleio2influx
The script is pretty simple and it seems to run under the Powershell 6 preview in linux as well.
Thanks
A
andyinv
37 Posts
0
August 29th, 2018 08:00
One thing has come up that I'm struggling to get to the bottom of - looks like powershell's Invoke-RestMethod and Influx REST api are having issues under some combinations. First few writes to influx work fine, then they start timing out.
Works fine on a Windows 10 client (powershell 5.1), and my Win7 VM uses Powershell 5 - but some 2012R2 boxes are still on Powershell 4 and it's that that seems to be the issue...
Oddly, even when the script has stopped, I still see connections to the Influx REST on port 8086, and I think it's something to do with KeepAlives...
edit: updated the code to disable HTTP keepalives to influx, but I think this has a dependency on powershell 5 being present.
If anyone could try it out and report back, that would be useful. All feedback welcome on the script.
Thanks
A
andyinv
37 Posts
0
September 21st, 2018 08:00
Updated it with some bug fixes, and Powershell Core compatibility..
Out of interest, anyone using this at all?
paulwc
1 Message
1
October 1st, 2018 18:00
Hi,
Yes, got it up and running yesterday. Thanks for your efforts.
andyinv
37 Posts
0
November 23rd, 2018 02:00
Updated the script so it now logs a count of disk errors to a new measurement, ScaleIOErrors - and also emails alerts containing useful information like the node, the device name and the physical path, to help aid in identification and resolution for replacing the disk. Enclosed a new dashboard as well to show how this can be used, although you'd need to change accordingly for your cluster names.