Environment
Situation
Create a repository for SNMP alerts
Configure SNMP alerts for SecureLogin
Resolution
- Login Successful
- Wrong Password
- Change Password
- Incorrect Login
- Account Lockout
The SNMP alert will send a message to the SNMP server in the following format:
Application Name – Username – Alert message
For Example:
Notepad.exe – mkeeffe – Account Locked before continuing, please ensure that you have the following files installed in “C:Program FilesprotocomSecureLogin” directory: Libsnmp.dll Slsnmp.exe Also ensure that SNMP server has SecureLogin.mib file imported and compiled. If you do not have these files, please contact support.
To configure the SecureLogin enabled application to send SNMP alerts, follow the instructions below:
1. Insert the following Lines into the top of the Application Definition:
Include SNMP_ALERTS Set ?App [Application Name]
For Example:
Include SNMP_ALERTS Set ?App Notepad.exe
2. To send an alert at a particular point in the Application definition, call the matching subroutine from the SNMP_ALERTS script which is attached further below. For example the following alerts contained in the SNMP_ALERTS script are inside the following sub routines:
Login Successful (SNMP_SuccessFullLogin) Wrong Password (SNMP_WrongPassword) Change Password (SNMP_ChangePassword) Incorrect Login (SNMP_IncorrectLogin) Account Lockout (SNMP_AccountLockout)
For Example: If I wanted to send a Wrong Password SNMP alert, the following line would be inserted at the point of the script where SecureLogin handles the wrong password. (The line to be inserted is in bold)
If –Text ""Incorrect Password. Please Try again"" Call SNMP_WrongPassword DisplayVariables ""Incorrect Password. Please try again."" Type $Password Password EndIf
3. Create a generic type SecureLogin definition called SNMP_ALERTS and copy and paste the following script:
##===================================================================== # Name: SNMP_ALERTS # Date: 16th May 2005 # Author: Martin Keeffe # Purpose: A Generic Template for Applications to send SNMP alerts. # # SNMP ALERTS # ALERT SUB-ROUTINE #- Login Successful (SNMP_SuccessFulLogin) #- Wrong Password (SNMP_WrongPassword) #- Change Password (SNMP_ChangePassword) #- Incorrect Login (SNMP_IncorrectLogin) #- Account Lockout (SNMP_AccountLockout) # # NOTE: The Current IPADDRESS of the SNMP Server is 127.0.0.1. # This may need to change ##===================================================================== Sub SNMP_SuccessFulLogin Strcat ?Part1 ?app ""-"" Strcat ?Part2 ?Part1 ?Sysuser Strcat ?Error ?Part2 "" - Login Successful"" Run ""C:Program FilesprotocomSecureLoginslsnmp.exe"" public 127.0.0.1 ?Error EndSub ##===================================================================== Sub SNMP_WrongPassword Strcat ?Part1 ?app ""-"" Strcat ?Part2 ?Part1 ?Sysuser Strcat ?Error ?Part2 "" - Wrong Password"" Run ""C:Program FilesprotocomSecureLoginslsnmp.exe"" public 127.0.0.1 ?Error EndSub ##===================================================================== Sub SNMP_ChangePassword Strcat ?Part1 ?app ""-"" Strcat ?Part2 ?Part1 ?Sysuser Strcat ?Error ?Part2 "" - Changing Password"" Run ""C:Program FilesprotocomSecureLoginslsnmp.exe"" public 127.0.0.1 ?Error EndSub ##===================================================================== Sub SNMP_IncorrectLogin Strcat ?Part1 ?app ""-"" Strcat ?Part2 ?Part1 ?Sysuser Strcat ?Error ?Part2 "" - Incorrect Login"" Run ""C:Program FilesprotocomSecureLoginslsnmp.exe"" public 127.0.0.1 ?Error EndSub ##===================================================================== Sub SNMP_AccountLockout Strcat ?Part1 ?app ""-"" Strcat ?Part2 ?Part1 ?Sysuser Strcat ?Error ?Part2 "" - Account Lockout"" Run ""C:Program FilesprotocomSecureLoginslsnmp.exe"" public 127.0.0.1 ?Error EndSub ##=====================================================================
Please note that the location of slsnmp.exe may be different and the IPAddress of the specified SNMP server will be different. Currently the IPAddress of the server is set to 127.0.0.1.
To create more SNMP alerts, use the following template and append it to the bottom of the SNMP_ALERTS script.
##================================================================== Sub [NameOfAlert] Strcat ?Part1 ?app ""-"" Strcat ?Part2 ?Part1 ?Sysuser Strcat ?Error ?Part2 "" – [Alert String]"" Run ""C:Program FilesprotocomSecureLoginslsnmp.exe"" public [IP Address] ?Error EndSub ##==================================================================
[NameOfAlert]
This is the name of the SubRoutine that sends the SNMP Alert. The naming should be similar to the others listed, so it is easier to refer and call in other scripts. For Example:
Sub SNMP_ApplicationClosed
[AlertString]
Alert string is the string that will appear in the log. For example:
Strcat ?Error ?Part2 ""- Application Closed""
[IP Address]
Specify a valid SNMP server that all alerts are sent to.