Populate the Hostname in Events
Map target IPs to hostnames via Redis so BMC events show the server hostname.
To populate the hostname in events, follow the steps below:
1. Copy and paste the latest UTP build in the directory below (remove the old UTP from this location).
<a1home>/Appsone_Service/a1eventhandler/plugins
2. Log in to the Redis cluster with the master Redis IP and port.
Add the key by executing the command below:
HSET /utp/plugin/host-address UTP_PLUGIN_HOST-ADDRESS '{"<TargetIP1>": "<serverHostName1>", "<TargetIP2>":"<serverHostName2>"}'
For example:
HSET /utp/plugin/host-address UTP_PLUGIN_HOST-ADDRESS '{"192.0.2.182": "HQServer111", "192.0.2.183":"HQServer112"}'
Here, find the details below:
- 192.0.2.18 and 192.0.2.184 are the host addresses for which the hostname must be populated.
- serverHostName is the hostname that should be populated in a ticket.
- If the Redis key doesn’t exist in the Redis cluster, the host address will be added as the hostname.
3. Edit the BMC templates.
a. Open all BMC templates where they are getting mounted.
b. Add the parameter “${LatestEvents_HostName}” in the “msg” section, like below.
"msg":
"${SignalDescription},${LatestEvents_InstanceName},${LatestEvents_HostAddress},${LatestEvent s_HostName},${LatestEvents_KpiName},${Latest Events_value},${KPIAttribute},${LatestEvents_EventDetectedTime},${Signal_Type}"
c. Ensure it is added to all BMC templates.
4. Restart A1EventHandler.