System Monitoring, TSAPI

Avaya Monitoring Tool and Nagios Integration

Introduction

This tool uses Avaya TSAPI library, it monitors Avaya resources such as Trunk group, Hunt group and Test numbers. When default conditions such as Trunk group member, Hunt group member becomes ZERO or the Test number is unreachable, it sends notification emails to administrators. Some triggers such as Skill Login or Logout can be executed right after such condition happened.

3 Aug 2015, AvayaMonitor 1.4.1 just released. This version supports “answerjob” testing. We can dialed a number and test if specific number is answered or a specific split number is answered.

12 May 2015, AvayaMonitor 1.4.0 just released. This version supports testing of recorder stations at specified time slot, integration with bcmsSVR for checking of ACD alarms and execution of restful API when error or resume conditions occurred.

Preparation and Password Encryption

  • The access MDB file stored the the username and password of AE server. For security reason, a tool called encryptpasswd.exe is provided to generate encrypted password for the installation and configuration of the software
  • Execute the program, generate the encrypted passwords for the user of AE server, then paste the encrypted password to parameter tc_tlink. For example, the encrypted password for “p@ssword” is “R3NIw1yJMLlnPFzEQtuh2A==”
  • encryptpasswd

64 bit Windows System 

  • For 64 bit Windows system, please follow the steps below
    •  Download and install the Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update, http://www.microsoft.com/en-us/download/details.aspx?id=26347
    • Configure ODBC System DSN using C:WindowsSysWOW64odbcad32.exe
    • Stop the Windows firewall because it enables by default and I don’t have time to figure out what ports are required to open, you need to find it out yourself.

Installation

  • Download the TSAPI client for Windows 32-bit from Avaya web site, it contains the library files. You need register DevConnect before you can access the download page.
  • Download the Avaya Monitoring Tool zip file here.
  • Follow the installation steps below to install the software.
    • Extract all the files into directory c:\program files\avayamonitor
    • Open Windows Command Prompt, enter the following commands to register the program as Windows Service
      • cd c:\program files\avayamonitor
      • avayamonitor -i
    • Open ODBC Setting, create System DSN called AVAYAMONITORCFG for Microsoft Access Driver and point the DB to avayamonitor.mdb which is located at the directory c:\program files\avayamonitor
    • Open the Access file, edit the value of parameters tm_tlink_01 and tm_tlink_02 to the TLINK of your AES servers in the tParameter table
    • Edit the value of parameter tg_emailserverip to define your email server IP address.
    • Edit the value of parameter tg_emailsmtpport to define the SMTP port number of your email server. The default value is 25.
    • Edit the value of parameter tg_emailusername to define the  username of email agent which is responsible to send notification emails.
    • Start the Windows Service AvayaMonitor
    • Telnet to localhost and port number 14008, enter username tcpgate and password tcpgate01 to access the program console
    • Type genpass in the program console to generate encrypted password string for the email agent, copy the string for later use.
    • Stop the Windows Service AvayaMonitor
    • Open the Access File again for other parameters
    • Edit the value of parameter tg_emailpasswd to define the password of the email agent. The password should be in encrypted format, you can use console command genpass to generate the encrypted password.
    • Edit the value of parameter tg_emailsenderdisplay to define the display name of the email agent.
    • Edit the value of parameter tg_emailauth to define whether authentication is required between your machine and the email server. When your email server trust your machine, set it to false, otherwise set it to true.
    • Edit the value of parameter tg_emailssl to define whether SSL communication is required for the SMTP session. The default value is false, set it to true when SSL is required.
    • Start the Windows Service AvayaMonitor
    • Telnet to localhost and port number 14008, enter username tcpgate and password tcpgate01 to access the program console
    • Enter the following command to add trunk group monitoring
      • add trunk 412 24 name
      • Hint: 412 is trunk access code (TAC), provide a name so you can identify it easily
      • Hint: 24 is the number of member of the trunk
    • Enter the following command to add IVR split monitoring
      • add ivrsplit 12345 name
      • Hint: 12345 is split number for IVR, provide a name so you can identify it easily
      • Hint: when the number of login agent is ZERO, alert email will be sent
    • Enter the following command to add Agent split monitoring
      • add agentsplit 12346 name
      • Hint: 12346 is split number for Agent, provide a name so you can identify it easily
      • Hint: when the number of login agent is ZERO and there is call in QUEUE, alert email will be sent
    • Enter the following command to monitor queue size of split
      • add splitqueue 12345 10 name 
      • Hint: 12345 is split number for IVR or Agent
      • Hint: when the call queue size > threshold value (e.g. 10), an alert email will be sent
    • Enter the following command to add Emergency split monitoring
      • add emergencysplit 12347 name
      • Hint: 12347 is Emergency split, provide a name so you can identify it easily
      • Hint: when the number of login agent is > ZERO, alert email will be sent
    • Enter the following commands for test number monitoring
      • add phantom 12345
      • Hint: 12345 is phantom device which is used for call dialing
      • add testnumber 912345678 description
      • Hint: phantom device 12345 will be used and the number 912345678 will be dialed at interval that specify by parameter tm_schedulerinterval
    • Enter the following command in the program console to add your email address
      • add email youremail@company.com
      • Hint: replace your email address please
    • Enter the following command in the program console, you will receive debug information.
      • trace on asc
    • Enter the following command in the program console, you will get the help message
      • help

Triggers ACD Login/Logout When Check Error

  • Enter the following command to implement skill trigger for a monitored number
    • genpass
      • Hint: use the genpass command to generate an encrypted password for acd login
    • add skilltrigger 912345678 66001 55001 oKd75RltJLcf+uXkp2CYHA== login
      • Hint: 912345678 is the monitoring number resource, it can be trunk group, ivr split, agent split or test number
      • Hint: 66001 is an extension number for ACD login or logout
      • Hint: 55001 is an agnt ID for ACD login or logout
      • Hint: oKd75RltJLcf+uXkp2CYHA== is encrypted password, use that one generated by genpass command
      • Hint: login means ACD login when error occurred, logout means ACD logout when error occurred

Triggers Call Transfer to Announcement Message When Check Error

  • Enter the following command to implement transfer trigger for a monitored number
    • add transfertrigger 912345678 987654321 10001 10002 Comment
      • Hint: 912345678 is the monitoring number resources, it can be hunt group, ivr split, agent split or testing number
      • Hint: 987654321 is the dialed number when error or resume happened
      • Hint: 10001 is an announcement number for error condition
      • Hint: 10002 is an announcement number for resume condition

Triggers Make Call and Sends DTMF Pattern 

  • Enter the following command to implement dtmf trigger for a monitored number
    • add dtmf 0 1 5 123
    • add dtmf 0 2 6 999
      • Hint: dtmf parttern 0 has two steps, step 1 wait 5 seconds and sends DTMF 123, step 2 waits 6 seconds and sends DTMF 999
    • add dtmftrigger 912345678 987654321 0 1 Comment 
      • Hint: 912345678 is the monitoring number resources, it can be hunt group, ivr split, agent split or testing number
      • Hint: 987654321 is the dialed number when error or resume happened
      • Hint: 0 is the dtmf pattern for error condition
      • Hint: 1 is the dtmf pattern for resume condition

Triggers RESTful API 

Line Tester Feature 

  • Enter the following command to add a line tester job
    • add ltjob 1 apple 7 8 
      • add a line tester job called apple, start dialing from 7:00am and end at 8:00am
  • Enter the following command to add internal stations for testing
    • add ltstation 1 12345 
      • add one station to the job
    • bulkadd ltstation 1 12345 12350
      • add the range of stations to the job

Recorder Tester Feature 

  • Enter the following command to add a recorder tester job
    • add rtjob 1 orange 12345 5 6 
      • add a recorder test job called orange, start dialing announcement 12345 from 5:00am and end at 6:00am
  • Enter the following command to add agent stations for testing
    • add rtstation 1 40001
      • add one station to the job
    • bulkadd rtstation 1 40001 40005 
      • add the range of stations to the job

Answer Call Tester Feature 

  • Enter the following command to add a answer call tester job
    • add answerjob 1 orange 5 6  12345 54321
      • add a answer call test job called orange, start the job from 5:00am to 6:00am, call number 12345 and expected answered by 54321

Nagios Plugin

  • Trunk Monitoring
  • trunkmonitor
  • IVR Monitoring
  • ivrmonitor
  • Follow this link to Nagios Plugins. Currently, three plugins for trunk, ivrsplit and agentsplit are available
  • Follow the steps below to compile the plugins, for example the steps to compile the trunkutil plugin
    • tar xzvf trunkutil-x.x.tar.gz
    • cd trunkutil-x.x
    • make

Nagios Configuration 

  • The guide is written for CentOS 6.4 and the following pages are referenced
  • Follow this guide http://sharadchhetri.com/2013/05/19/installing-nagios-3-5-0-in-centos-6-4-using-yum/ to install Nagios
  • After installation of Nagios, add the following to the commands.cfg whic is located in /etc/nagios/objects
    define command{
    command_name process-service-perfdata-file
    command_line /bin/mv /var/log/pnp4nagios/service-perfdata /var/log/pnp4nagios/spool/service-perfdata.$TIMET$
    }
    
    define command{
    command_name process-host-perfdata-file
    command_line /bin/mv /var/log/pnp4nagios/host-perfdata /var/log/pnp4nagios/spool/host-perfdata.$TIMET$
    }
    
    # trunkutil command
    define command{
    command_name check_avaya_trunk
    command_line /usr/lib/nagios/plugins/trunkutil 10.10.10.1 5100 $ARG1$ 80 100
    }
    • the command trunkutil is the plugin that provided by me, copy it to /usr/lib/nagios/plugin after the make command
  • Add the following to the templates.cfg which is located in /etc/nagios/objects
    define host {
    name host-pnp
    action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_
    register 0
    }
    define service {
    name srv-pnp
    action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
    register 0
    }
  • create a file called  avayamonitor.cfg and put it in /etc/nagios/objects, the contents as follow. Or, just get it by this link.
    ###############################################################################
    # AVAYAMONITOR.CFG - SAMPLE CONFIG FILE FOR MONITORING the Avaya Monitor Server
    ###############################################################################
    
    ###############################################################################
    ###############################################################################
    #
    # HOST DEFINITIONS
    #
    ###############################################################################
    ###############################################################################
    # Define the Avaya Monitor Server host
    # Change the host_name, alias, and address to fit your situationdefine host{
    use windows-server ; Inherit default values from a template
    host_name avaya-monitor-server ; The name we're giving to this host
    alias Avaya Monitor Server ; A longer name associated with the host
    address 10.10.10.1 ; IP address of the host, replace yours
    check_command check-host-alive
    }
    ###############################################################################
    ###############################################################################
    #
    # HOST GROUP DEFINITIONS
    #
    ###############################################################################
    ###############################################################################
    # Define a hostgroup for Windows machines
    # All hosts that use the windows-server template will automatically be a member of this groupdefine hostgroup{
    hostgroup_name windows-servers ; The name of the hostgroup
    alias Windows Servers ; Long name of the group
    }
    
    ###############################################################################
    ###############################################################################
    #
    # SERVICE DEFINITIONS
    #
    ###############################################################################
    ###############################################################################
    
    define service{
    use generic-service ; Name of service template to use
    host_name avaya-monitor-server
    service_description PING
    check_command check_ping!100.0,20%!500.0,60%
    }
    
    define service {
    use generic-service,srv-pnp
    service_description TAC401_YOUR_TRUNK_NAME ; replace this with your trunk name
    check_command check_avaya_trunk!401 ; replace 401 by trunk access code
    host_name avaya-monitor-server
    }
  • Use this file in nagios.cfg by the following command
    cfg_file=/etc/nagios/objects/avayamonitor.cfg
  • Follow this guide http://docs.pnp4nagios.org/pnp-0.6/config, under the section Bulk Mode with NPCD, change the nagos.cfg as follow
    process_performance_data=1
    service_perfdata_file=/var/log/pnp4nagios/service-perfdata
    service_perfdata_file_template=DATATYPE::SERVICEPERFDATAtTIMET::$TIMET$tHOSTNAME::$HOSTNAME$tSERVICEDESC::$SERVICEDESC$tSERVICEPERFDATA::$SERVICEPERFDATA$tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$tHOSTSTATE::$HOSTSTATE$tHOSTSTATETYPE::$HOSTSTATETYPE$tSERVICESTATE::$SERVICESTATE$tSERVICESTATETYPE::$SERVICESTATETYPE$
    service_perfdata_file_mode=a
    service_perfdata_file_processing_interval=15
    service_perfdata_file_processing_command=process-service-perfdata-file
    host_perfdata_file=/var/log/pnp4nagios/host-perfdata
    host_perfdata_file_template=DATATYPE::HOSTPERFDATAtTIMET::$TIMET$tHOSTNAME::$HOSTNAME$tHOSTPERFDATA::$HOSTPERFDATA$tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$tHOSTSTATE::$HOSTSTATE$tHOSTSTATETYPE::$HOSTSTATETYPE$
    host_perfdata_file_mode=a
    host_perfdata_file_processing_interval=15
    host_perfdata_file_processing_command=process-host-perfdata-file
  • Change the spool directory of npcd to /var/log/pnp4nagios/spool/ in /etc/pnp4nagios/npcd.cfg
  • Create this spool directory by the following commands
    • mkdir /var/log/pnp4nagios/spool/
    • chown nagios.nagios /var/log/pnp4nagios/spool/
  • Make the Nagios, NPCD and httpd startup automically
    • chkconfig nagios on
    • chkconfig npcd on
    • chkconfig httpd on
  • Reboot and login nagios

Uninstallation

  • Stop the Window Service AvayaMonitor
  • Open Windows Command Prompt, enter the following commands to uninstall the program from Windows Service
    • cd c:\program files\avayamonitor
    • AvayaMonitor -u
Advertisements

12 thoughts on “Avaya Monitoring Tool and Nagios Integration

  1. I am a software engineer trying to develop a plugin for Avaya for my company’s custom monitoring tool.
    I was going through your link
    https://programitsimple.wordpress.com/2013/03/29/avayamonitor/
    I would need some help from you to understand the below:-
    1) Is this plugin develped by you for Nagios monitoring tool?
    2) For developing such a plugin for Avaya, what all do we need i.e. Avaya’s JTAPI SDK alone is sufficient?? or do we need to buy AE Server Platform from Avaya.
    I am a novice. Kindly help me in getting started.

    Like

  2. dear team, i have problem when i try step “Telnet to localhost and port number 14008, enter username tcpgate and password tcpgate01 to access the program console” it couldn’t execute cause port 14008 not activated but port 23 is already activate

    Like

  3. dear team i have some trouble, i was stuck on step “Telnet to localhost and port number 14008, enter username tcpgate and password tcpgate01 to access the program console” itry to telnet but port 14008 still not activated but port 23 is already open.

    Like

  4. Dear
    I would like to know if these plugins will work with nagios 4 / Redhat .
    I tried make command and get the following error:
    – – – – – – – – – –
    sock.o:(.gnu.linkonce.r._ZTIN7CObjVarI5CSockE10CObjVarErrE+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info’
    sock.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0′
    thrmutex.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0′
    collect2: ld returned 1 exit status
    make: *** [trunkutil] Error 1
    Thanks

    Like

    1. Linux version 2.6.32-358.14.1.el6.x86_64 (sandman@ceph01t6) (gcc version 4.4.7 20120313 (Novell 4.4.7-3) (GCC) ) #1 SMP Tue Jul 16 22:17:30 EDT 2013

      Thank you for your help

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s