Skip to Content
0

IoT - POSTing data into HANA DB Table in HANA Trail Account

Sep 19, 2017 at 11:18 AM

77

avatar image
Former Member

Hi,

I have configured processingService as below

I have testing throught HTTP Request as below.

When i see the message log. I am getting DB_AVAILABILITY as 0.0.

Please help me to fix the issue.

My HANA DB Details as below in Tables.png

Let me know if anything else i have missed out.

Thank you in advance.

Thanks,

Babu

processing.png (272.8 kB)
http-request.png (253.4 kB)
log.png (46.8 kB)
tables.png (38.0 kB)
tables.png (38.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Anton Levin
Sep 19, 2017 at 12:01 PM
0

Hello Babu,

"T_IOT_MONITOR_LOG" table keeps the built-in JMX Checks [1], [2] of the IoT MMS. The "DB_AVAILABILITY" is one of them. Having its value equal to zero means everything is "ok". Zero value follows the Nagios guidelines [3].

As far as I understood, you try to leverage the "Customized Table Mapping" and want your device messages land in the "temperature" table, right? Watch out, you table is located in "BABU" schema but you have configured your mapping with "MYSCHEMA" name.

Regards,

Anton

[1] https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/21d734fa88f44298a8a9cb1f759f8fb9.html

[2] https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/298a207f33c4484b9894b7c4e2900566.html

[3] https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT

[4] https://help.sap.com/viewer/7436c3125dd5491f939689f18954b1e9/Cloud/en-US/c665f61f0bf64aaca766d9d1a84a9710.html

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi anton,

Thanks for your valuable responds.

I have changed the schema, Still problem is not cleared. Please help me with some suggestion or troubleshooting and debugging methods.

Thanks,

Babu

0

To do that, please provide more information.

  1. What user in "Custom Logon" is used currently in your MMS DB Binding?
  2. Is your "temperature" table is of type "row" or "column"?
  3. What are DeviceType and MessageType IDs you used when creating a mapping?
  4. What is your payload which device sends? What Message Type ID is used there? To what DeviceType your device belongs?
0
Former Member

Hi Anton,

Please see below for the information.

  1. What user in "Custom Logon" is used currently in your MMS DB Binding?

I have user : BABU

2.Is your "temperature" table is of type "row" or "column"?

I have mentioned column type in ProcessingService.

I have Table type COLUMN in db as well. I have observed once i have deployed the IoT service again. I can see the two tables has been populated automatically and also i can see the data inside two tables which i have highligted below. can you please tell me why and how these tables has been populated here>

3.What are DeviceType and MessageType IDs you used when creating a mapping?

4.What is your payload which device sends? What Message Type ID is used there? To what DeviceType your device belongs?

To avoid confusion now i have removed all the remaining, message, device types and device.

But still problem exist. Please help me.

Thanks,

Babu

0
Former Member
Former Member

my payload is as below.

Message:

{"mode":"sync","messageType":"986294cc4603be27bd93","messages":[{"TEMP":"123","LIGHT":"20"}]}

EndPoint:

https://*****trial.hanatrial.ondemand.com/com.sap.iotservices.mms/v1/api/http/data/a4131b95-6657-4650-b72b-084aa9d81260

Below is the error i got for the above request:

CodeMessage202{"msg":"https://iotmms****trial.hanatrial.ondemand.com/com.sap.iotservices.mms/v1/api/http/ack/a4131b95-6657-4650-b72b-084aa9d81260/1ec76cd5-51f9-4db6-ac0e-3438ffce56c8","retryAfterHeaderValue":"60"}

0
Anton Levin
Sep 20, 2017 at 11:14 AM
0

Hello Babu,

let me please summarize the above provided information and point to the missing parts:

  1. Your DB user is BABU (schema has the same name here - BABU)
  2. You custom "column" table is located under BABU schema and has 2 columns "temp", "light"
  3. You have a MessageType with ID 83c...b6d and fields "temp", "light"
  4. You have DeviceType with ID e18..486
  5. Is DeviceType e18..486 mapped to the MessageType 83c...b6d? (you may check it by opening the "Msg. Types" tab of the Device Type view)
  6. You have Device with IDa41...260 of DeviceType e18...486
  7. Mapping screenshot is missing. What values of the MessageType and DeviceType are used there
  8. Payload is laready wrong. You are referencing a MessageType with ID 986...d93 but it should be MessageType with ID 83c...b6d. Field names are case sensitive, so instead of "TEMP", "LIGHT" use "temp", "light"

Waiting for the missing points (5 and 7)

Anton

P.S. I would also recommend to increase the log level for the "*iot*" relevant packages in the "iotmms" application (re-start is required) and check if something suspicious is already there in the logs.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Anto,

I have actually posted wrong payload, which i used earlier.

Now when I tried with correct payload as u mentioned. Its works fine.

The one change i have done is I have changed the DB Table Type as COLUMN which was ROW by default.

I also checked in my HANA DB Table. values has been populated there.

Thanks for your help.

Cheers,

Babu

sucess.png (54.6 kB)
0