Looking for the Perfect Dashboard: InfluxDB, Telegraf and Grafana – Part XXVIII (Monitoring HPE StoreOnce)

Greetings friends, a new week is a week with a new dashboard, this is so, I would like to be able to offer you many more use cases, with many other technologies, but time is very limited and I only have some nights to prepare this.

Today we are going to see a very interesting topic, I was talking about HPE StoreOnce in previous posts, so as you can imagine, today this Dashboard is about this technology, from which we will extract information using the RESTful API that it brings with it.

Once you have finished this tutorial, you will have something similar to this, it is better to give it several days or weeks to see the full potential:

In awesome light-mode:In the always Matrix-look dark-mode:

RESTful API topology, InfluxDB and Grafana monitoring disk usage and much more about HPE StoreOnce

Although I have already shown you in some occasions the diagram of how would be the monitoring using Grafana and InfluxDB, I leave you again the diagram, this time monitoring all the information of HPE StoreOnce thanks to its RESTful API:

We will be able to create a user with only privileges to see graphs in HPE StoreOnce, in the following way, inside our interface, in Settings – Users and Groups:

We can click now in Add user or group: We can select between Local user, Directory User or Group, select the one that you are using, with a new username and pass, and select the role Observer:

Download and configure the hpe_storeonce_grafana.sh script

We will download the script that will make all this work, we will download the latest version from the Github repository:

This shell script should be run from anywhere you have a Linux, for example the Grafana server is fine. We will have to edit the configuration parameters:

# Configurations
# Endpoint URL for InfluxDB
InfluxDBURL="http://YOURINFLUXSERVER" #Your InfluxDB Server, http://FQDN or https://FQDN if using SSL
InfluxDBPort="8086" #Default Port
InfluxDB="telegraf" #Default Database
InfluxDBUser="INFLUXUSER" #User for Database
InfluxDBPassword='INFLUXPASS' #Password for Database

# Endpoint URL for login action
storeonceUsername="HPEUSERNAME" #Your username, if using domain based account, please add it like [email protected] (if you use domain\account it is not going to work!)
storeonceRestPort="443" #Default Port

Let’s make it executable with the next command:

chmod +x hpe_storeonce_grafana.sh

We will make sure we have jq installed, an apt-get install jq or yum install jq if we use CentOS:

sudo apt-get install jq

We can run it now with the next command ./hpe_storeonce_grafana.sh and if everything has run smoothly, here will be the output:

Writing hpe_storeonce_parametrics Operations to InfluxDB
HTTP/1.1 204 No Content
Content-Type: application/json
Request-Id: ee3d9629-f0ef-11ea-ae91-dca632b112f7
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.8.2
X-Request-Id: ee3d9629-f0ef-11ea-ae91-dca632b112f7
Date: Mon, 07 Sep 2020 09:53:07 GMT

Also, it would be nice to put it in the cron to run every 30 minutes, maybe every 15, or less, it’s up to you:

sudo crontab -e
*/30 * * * * /home/oper/hpe_storeonce_grafana.sh >> /var/log/hpestoreonce.log 2>&1

That’s it, let’s move to the next step.

Grafana Dashboard

I have created a Dashboard from scratch selecting the best requests to the database, finishing colors, thinking about graphics and how to show them, and also everything is automated so that it fits our environment without any problem and without having to edit anything manually. The Dashboard can be found here, once imported, you can see all the graphics:

How to easily Import the Grafana Dashboard

So that you don’t have to waste hours configuring a new dashboard, and ingesting and debugging you want, I have already created four wonderful dashboards with everything necessary to monitor our environment in a very simple way, it will look like the image I showed you above. Select the name you want and enter the ID: 12881, which is the unique ID of the Dashboard, or the URL:

We’ll have everything popping up without any problem:
That’s all folks, if you want to follow the full Blog series about Grafana, InfluxDB, Telegraf, please click on the next links:

Author: jorgeuk

Father, writing in https://www.jorgedelacruz.es and https://jorgedelacruz.uk Blogger, Systems Engineer @veeam - vExpert 2014/2020 & NTC 2018/19

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.