search cancel

RESTmon ERROR - Exception: failed to send alarms to DOI.

book

Article ID: 240174

calendar_today

Updated On:

Products

DX Operational Intelligence

Issue/Introduction

I can see the following error in RESTmon (VM version) log:

2022-03-31 12:20:01,673 [pool-5-thread-5] ERROR DoiPublisher:120 - Exception: failed to send alarms to DOI.
java.sql.BatchUpdateException: data exception: string data, right truncation;  table: PUBLISHED_ALARM_ATTRIBUTES column: ATTR_VALUE
  at org.hsqldb.jdbc.JDBCPreparedStatement.executeBatch(Unknown Source)
  at com.ca.ce.restmon.common.db.dao.PublishedAlarmsDao.insertPublishedAlarms(PublishedAlarmsDao.java:158)
  at com.ca.ce.restmon.common.db.DbUtil.insertPublishedAlarmDetails(DbUtil.java:763)
  at com.ca.ce.restmon.publish.doi.update.SendAlarmsToDOI.storeOIPublishedAlarms(SendAlarmsToDOI.java:300)
  at com.ca.ce.restmon.publish.doi.update.SendAlarmsToDOI.sendAlarmsToDOI(SendAlarmsToDOI.java:243)
  at com.ca.ce.restmon.publish.doi.DoiPublisher.publishAndForgetAlarmData(DoiPublisher.java:116)
  at com.ca.ce.restmon.common.handlers.profile.ProfileHandler.checkPublishAlarms(ProfileHandler.java:840)
  at com.ca.ce.restmon.common.handlers.profile.ProfileHandler.lambda$processAndPublishAlarmDataForLog$5(ProfileHandler.java:785)
......

and we are missing alarm data in OI from this surce

 

Environment

Release : 21.3

Component :

Resolution

Log analysis showed that the issue is that one of the alarms coming in has an excessively long summary field (135k)The suggested approach for this initially is to reduce the length of the summary field being sent but adding a java script substring function (https://www.w3schools.com/jsref/jsref_substring.asp)  to truncate the summary field to 256 bytes in the custom schema definition.