Infrastructure at your Service

Nabil Saoual

Control-M/EM sending alert to SNMP

By July 23, 2020 Control-M 4 Comments

Hello everybody, today we will see how to send Control-M alerts to a central monitoring software

Introduction

The aim is to send alerts and logs from Control-M to an event manager system such as Patrol/ BMC Truesight or Nagios.
We will see together how to link Control-M to a central monitoring tool,and for that,Control-M admin and monitoring admin must work hand in hand 😊.So let’s start!

Copy the Control-M/EM MIB file to your SNMP server:

First, we must copy the MIB file to the  SNMP server (send it to the monitoring application admin as he will have to use it for his monitoring tool’s configuration)
Control-M EM _DIR\Data\ BMC-CONTROLMEM-MIB.txt
The BMC-CONTROLMEM-MIB.txt contains SNMP variable and trap format that Control-M/EM uses to send alerts to an event management system via SNMP 
For more details follow this link:
http://documents.bmc.com/supportu/9.0.19/help/Main_help/en-US/index.htm#45731.htm
Configure ControlM/EM the system parameters
Reminder on Alerts and Xalerts:
Alerts and Xalerts can be sent to a central monitoring tool,trigger a script and pass infos as parameters and of course be configured to send notifications when a problem occurs ( more details on bmc support site )

Alerts:
-Alerts can receive shouts from jobs (must be configured on the job)
-Alerts can display communication messages such as agent availability or communication to Control-M/Server errors

Exceptions alerts (Xalerts):
-Generated by the EM server of internal errors from components
-We can view these alerts under Manage/Exception panel
From the CCM, define the following system parameters, as described in Defining Control-M/EM system parameters:

  • SNMPHost: Define the hostname of the SNMP server where the alerts are sent.
  • SNMPSendActive: Change the value to 1 to generate SNMP messages for Active Alerts.
  • SendSNMP: Change the value to 0 to send alerts to SNMP server only.
  • SendAlertNotesSnmp: Change the value to 1 if you want to send the NOTES field to the SNMP server.
  • XAlertsEnableSending: Change the value to 1 to enable xAlert sending. Note that default value is 1.
  • XAlertsSnmpHosts: Define the hostname of the SNMP server where the xAlerts are sent.
  • XalertsSendSnmp: Change the value to 1 to send xAlerts to SNMP server only (you can also define it to send Xalerts to a script or both.) For more information about Alert parameters, see Control-M/EM general parameters.

To proceed, we will use the Control-M Configuration Manager and configure it from Control-M/EM the system parameters part:

The search bar allows you to display every parameter linked to SNMP and alert sending

Most important fields are:
Name: indicate the name of the parameter
Description: indicate the parameter role
Refresh method: indicate if Control-M component should be restarted (recycle) for changes to take effect
Following this information, we will activate SNMP trap sending and define the host corresponding to the monitoring machine
Especially we will focus on configuring and sending SNMP  traps to the central monitoring tool by adding it’s address in the appropriate field

Important
Note that the refresh method is a critical point for changes to take effect:

Automatic: no action needed for the change to take effect
Manual: action needed for the change to take effect
Recycle: Cycle the related component for the change to take effect
Recycle GATEWAY
Here we will have to recycle components for the changes to take effect:
Select on the gateway the option “recycle”

Once the gateway indicates connected status the changes are taken in account
Test to send alert to central monitoring tool.
As from Control-M side the SNMP sending configuration is done, the final step is to test by sending an alert to the alert window with a failing test job for example
Check if the central monitoring server is receiving the trap (synchronize with the monitoring application administrator). If your administrator confirm the trap is received then everything is ok

Conclusion

Now you know how to send traps to an external monitoring tool. For more information and further configuration please go to BMC site and check the documentation
You can go to the help part of your Control-M workload client., also following this link for example you can have the SNMP trap format:
http://documents.bmc.com/supportu/9.0.19/help/Main_help/en-US/index.htm#45731.htm
Feel free to check dbi-services bloggers and share with us you experience and tips of BMC Control-M!

4 Comments

  • Neha says:

    Hi Nabil,

    thanks for the article, where to check the alerts are gone to SNMP server. does our controlm server host any log file?

    Thank you.

  • Nabil Saoual says:

    Hi Neha ,

    First you can create a cyclic job failing every 5/10 minutes to make your test.

    Connected on the CCM , Ensure you have also enabled the SNMP Trace by doing a right click on the gateway/select control shell and enter this shell command line in prompt:
    TRACE_SNMP on
    result should be :
    Done. SNMP trace set on.

    You can check if your Control-M server send snmp trap by checking the gtw_log files following the below directory :
    /home/emuser/ctm_em/log/gtw_log.CTMSRVNAME.20200728.1

    Example from mine :
    [[email protected] log]$ pwd
    /home/emuser/ctm_em/log
    [[email protected] log]$ tail -100 gtw_log.CTMSRVCENTOS.20200728.1
    [[email protected]:27:45.010:] ===> INFO: trace SNMP set on.
    snmp_send: initialize using 205039808:41472
    snmp_send: oid [0] >1.3.6.1.4.1.1031.9.1.1I1.3.6.1.4.1.1031.9.1.23501.3.6.1.4.1.1031.9.1.3CTMSRVCENTOS1.3.6.1.4.1.1031.9.1.41.3.6.1.4.1.1031.9.1.5000lw1.3.6.1.4.1.1031.9.1.6V1.3.6.1.4.1.1031.9.1.7Not_Noticed1.3.6.1.4.1.1031.9.1.8202007281530201.3.6.1.4.1.1031.9.1.91.3.6.1.4.1.1031.9.1.101.3.6.1.4.1.1031.9.1.11Ended not OK1.3.6.1.4.1.1031.9.1.12controlm1.3.6.1.4.1.1031.9.1.13SUBFOLDER1.3.6.1.4.1.1031.9.1.14APPLICATION1.3.6.1.4.1.1031.9.1.15JOB951.3.6.1.4.1.1031.9.1.16192.XX.XX.XX1.3.6.1.4.1.1031.9.1.17R1.3.6.1.4.1.1031.9.1.181.3.6.1.4.1.1031.9.1.191.3.6.1.4.1.1031.9.1.2000005<
    snmp_send: close socket and return

    You can also go to your monitoring tool server ( example nagios ) and check if traps are coming in by using below command:
    Example for Nagios:
    Use the tcpdump utility to listen to the ctm server trap sending (for nagios and centreon 162 is the default snmp listening port)

    tcpdump -i yourinterface port 162 ==> from nagios server

  • Maxime C. says:

    Hi Nabil,

    Thanks for this post, really helpful.
    My colleague Damien and I were really pleased with this detailled explanation ;).

    Regards
    Max

    • Nabil Saoual says:

      Hi Max !( may I ? 🙂 )
      Many thanks for your feedback and don’t hesitate to share knowledge if you got good tips on Control-M, I will be happy to share tricks with you and your colleague.
      Cheers

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Nabil Saoual
Nabil Saoual

Consultant