Messagegtw not consistently passing ${cs.id} in body
search cancel

Messagegtw not consistently passing ${cs.id} in body

book

Article ID: 264401

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

We have a use case where when a specific alarm is generated the NAS assigns the ticket and then calls a webhook (NAS rules below)

<Assign to Maintenance>
         active = no
         action = assign <userid>
         overdue = 5s
         message = *1074*
         level = warning
         probe = ntevl
         visible = 0
         order = 100
         origin = SHB
         break = no
</Assign to Maintenance>
   
   
<NTEVL PUT ROBOT IN MAINTENANCE>
         active = no
         action = webhook InMaintenanceAPIInMaintenanceAPI/DOMAIN/HUB/ROBOT
         overdue = 5s
         level = warning
         assign = <userid>
         probe = ntevl
         visible = 0
         order = 1
         origin = SHB
         break = no
</NTEVL PUT ROBOT IN MAINTENANCE>

This then places the robot in maintenance calling the messagegtw uimapi

<setup>
   nas = nas
   loglevel = 5
   cache_expiry_hours = 3
   data_engine = data_engine
   cache_max_size = 200000
</setup>
<listeners>
   <InMaintenanceAPI>
      bulk_size = 40
      send_exclusive = true
      attach_to_queue = true
      preprocessing_script = InMaintenanceAPI.groovy
      alert_on_failure = true
      uim_queuename = InMaintenanceAPI
      <publishers>
         class = com.ca.uim.agileops.gateways.webhooks.JsonHttpPublisher
         <config>
            <payload>
               cs = [${cs.id}]
            </payload>
            <headers>
               content_type = application/json
               http_method = POST
            </headers>
         </config>
         <1>
            isEncrypted = true
            password = <password>
            url = https://url/uimapi/maintenance_mode/<DOMAIN>/<PRIMARY>/<ROBOT>/add_computer_systems_to_schedule/3848
            auth_method = Basic
            username = <username>
         </1>
      </publishers>
   </InMaintenanceAPI>
</listeners>
<startup>
   <opt>
      java_opts = -server -XX:ErrorFile=./hs_err_pid.log
      java_mem_max = -Xmx1024m
      java_mem_init = -Xms64m
   </opt>
</startup>

For the most part this works OK, then randomly rather than adding the CS_ID of the alarmed robot it will use the CS_ID of the primary hub and place the primary in maintenance.

Even when I place the messagegtw on log level 6 it doesn't show the actual CS_ID that is being passed so I cannot identify if this is the NAS or messagegtw issue.

Environment

Release : 20.4

Resolution

The attached messagegtw test build will address this issue.

Attachments

messagegtw (5)_1682002994217.zip get_app