Using Influxdb as an on premise alternative to SAP Cloud IoT Service – SAP MII

In this article i will discuss using Influxdb as an on premise alternative to SAP Cloud IoT Service. Before we move on lets begin with some definitions and facts.

SAP Manufacturing Intelligence Integration (MII) is an application that links SAP ERP with MES. It aims to improve manufacturing operations with real-time analytics. It provides real-time visibility to overall business.

SAP MII is meant to run on SAP HANA which is a high-performance in-memory database that accelerates data-driven, real-time decision-making and actions, and supports all workloads, with the broadest advanced analytics on multi-model data, on premise and in the cloud.

Unlike most shopfloor application technologies, MII works flawless on premise. But there is a missing link for the Sap Cloud Iot service. On premise customers encouraged to use Sap Cloud Iot and thats all. If the on premise users like to integrate their sensor ecosystem they are left alone.

On customer site of influxdata platform i saw SAP used InfluxDB to monitor their Cloud Foundry multi cloud application platform. They chose InfluxDB for its ability to tag metric and event data and enjoy using both Grafana and InfluxDB.

Below comment was so convincing

We researched the best time series platforms and chose InfluxData because it is highly performant, provided high availability, and was more cost effective than the SaaS solutions we were considering,” said Christina Abraham, VP, Global Cloud Infrastructure & Operations at SAP Ariba. “InfluxData was easy to implement and is now the primary data store to collect metrics and events for SAP Ariba operations. InfluxData provides the basis for all the visualizations and alerting that is critical to our business.

I have investigated options to integrate mii with influxdb, so that i could use an on premise timeseries in memory database to store sensor driven bigdata.

In this part of the article i will try to explain the technical steps i followed. I assume you have a working influxdb server. If you dont you should set it up before moving on the below steps.

First you will need to open up your mii workbench and create a transaction.

Create an http post by drag and drop. Then assign the following properties to http post.


HTTP_Post_0.URL="http://yourserveripaddress:8086/write?db=yourdatabasename"

HTTP_Post_0.PostData="temperature,device=Machine1 value=29"

If you run the transction you will see the static string line query is processes on your influxdb.

The above postdata is an example insertion using influxdb line protocol. If you want you can use Local.Variablename Repeater_0.Item etc.  If you have questions leave comments below.

References:

https://www.influxdata.com/customer/sap/

https://docs.influxdata.com/influxdb/v1.8/write_protocols/line_protocol_tutorial/

https://www.sap.com/

How to change location of Influxdb storage folder

In this article i will try to list out the steps to move influxdb default directories in windows. After following the steps you will be able to configure influxDB to store its data in a different folder.

1.Create the new influxdb directory.

E:\NewInfluxDatabaseDirectory

1.1 Create the new influxdb configuration.

Open influxdb.conf and save as newinfluxdb.conf

Edit meta, data, wal-dir strings with the corresponding values.

Meta Directory;

[meta]
# Where the metadata/raft database is stored
dir = "E:\\NewInfluxDatabaseDirectory\\meta"

Data Directory:


[data]
  # The directory where the TSM storage engine stores TSM files.
  dir = "E:\\NewInfluxDatabaseDirectory\\data"

Wal Directory:


# The directory where the TSM storage engine stores WAL files.
  wal-dir = "E:\\NewInfluxDatabaseDirectory\\wal"

2.Run influxdb with new database configuration
Go to directory where your influxd.exe is located. Open up command prompt and type the following.


influxd.exe -config newinfluxdb.conf

In another article i am planing to show you how to move databases.

You can also watch the screencast about changing influxdb database directory.