I have my OrionNPM integrated with Remedy via RPC successfully!
Logic:
Structure (check image attached):
ESP_CreateEntry: ESP_CreateEntry program is one of the way to make integrations with Remedy ARS server. Following the closure of the company Elegant Software, responsible for this program and no longer make the amendments necessary for adapting to new versions of Remedy ARS. It is not always possible to modify the integration schemes used, and therefore it is necessary to know something more about the operation of this program to carry out proper maintenance of our Remedy ARS server and supporting integrations.
Scripts:
VBScript
---------------------------------------------------------------------------------------
Function formatTo2Digit(in_Num)
Dim temp
If IsNull(in_Num) Or in_Num = "" Or Len(CStr(in_Num)) > 2 Then
temp = ""
Else
temp = CInt(in_Num)
If temp < 10 Then
temp = "0" & CStr(temp)
Else
temp = CStr(temp)
End If
End If
formatTo2Digit = temp
End Function
Function reestructura(in_Date)
' "MM/DD/YYYY HH24:MI:SS" 01/01/01 13:12:11
Dim strDay, strMonth, strYear, strHour, strMinute, strSecond
strSecond = formatTo2Digit(Second(in_Date))
strMinute = formatTo2Digit(Minute(in_Date))
strHour = formatTo2Digit(Hour(in_Date))
strDay = formatTo2Digit(Day(in_Date))
strMonth = formatTo2Digit(Month(in_Date))
strYear = right(Year(in_Date),2)
reestructura = strMonth & "/" & strDay & "/" & strYear & " " & strHour & ":" & strMinute & ":" & strSecond
End Function
Function Main()
' Reemplaza expresion regular "(.)*OrionAlertEngine: T#," con nada
' Reemplaza dae time @10/11/2009 09:51:15 p.m.@ con formato mm/dd/aa hh:mm:ss
'Original message:
'Nov 10 2009 12:45:29 npm %OrionAlertEngine: T#,"client2","NY","NY AirPort !A001R","@11/10/09 12:45:29@","-+- Airport Newark NY R Down"
'Processed Message:
'"client2","NY","NY AirPort !A001R","10/11/2009 11:37:25","Airport Newark NY R Down","10/Nov/2009 11:37:25 p.m. A001R Airport Newark NY R Down"
Dim aryMonth(12)
aryMonth(0) = "/Nothing/"
aryMonth(1) = "/Jan/"
aryMonth(2) = "/Feb/"
aryMonth(3) = "/Mar/"
aryMonth(4) = "/Apr/"
aryMonth(5) = "/May/"
aryMonth(6) = "/Jun/"
aryMonth(7) = "/Jul/"
aryMonth(8) = "/Aug/"
aryMonth(9) = "/Sep/"
aryMonth(10) = "/Oct/"
aryMonth(11) = "/Nov/"
aryMonth(12) = "/Dec/"
Set RegularExpressionObject = New RegExp
With RegularExpressionObject
.Pattern = "(.)*OrionAlertEngine: T#,"
.IgnoreCase = True
.Global = True
End With
Fields.VarCleanMessageText = RegularExpressionObject.Replace(Fields.VarCleanMessageText, "")
Set RegularExpressionObject = nothing
' ----------------------------------------------------------------------------------------------------------
Set RegularExpressionObject = New RegExp
With RegularExpressionObject
.Pattern = "@(.)*@" 'Header orion
.IgnoreCase = True
.Global = True
End With
Set matches = RegularExpressionObject.Execute(Fields.VarCleanMessageText)
Set fechaaa = matches(0)
fechaaa=Replace(fechaaa, "@", "")
fechaaa=Replace(fechaaa, ".", "")
fechaaa=Replace(fechaaa, "/01/", aryMonth(1))
fechaaa=Replace(fechaaa, "/02/", aryMonth(2))
fechaaa=Replace(fechaaa, "/03/", aryMonth(3))
fechaaa=Replace(fechaaa, "/04/", aryMonth(4))
fechaaa=Replace(fechaaa, "/05/", aryMonth(5))
fechaaa=Replace(fechaaa, "/06/", aryMonth(6))
fechaaa=Replace(fechaaa, "/07/", aryMonth(7))
fechaaa=Replace(fechaaa, "/08/", aryMonth(8))
fechaaa=Replace(fechaaa, "/09/", aryMonth(9))
fechaaa=Replace(fechaaa, "/10/", aryMonth(10))
fechaaa=Replace(fechaaa, "/11/", aryMonth(11))
fechaaa=Replace(fechaaa, "/12/", aryMonth(12))
menosmasmenos=fechaaa
fechaaa=cdate(fechaaa)
'fechaaa=DateAdd("H",1,fechaaa) ' ajuste horario de verano remedy (Summer time correction)
fechaaa=reestructura(fechaaa)
Fields.VarCleanMessageText = RegularExpressionObject.Replace(Fields.VarCleanMessageText, fechaaa)
Fields.VarCleanMessageText= Replace(Fields.VarCleanMessageText, "-+-", menosmasmenos)
Set RegularExpressionObject = Nothing
' Set the return value to indicate that the script ran correctly
Main = "OK"
End Function
---------------------------------------------------------------------------------------
MS-DOS BATCH
---------------------------------------------------------------------------------------
@echo off
set ARTCPPORT=2010
set Descripcion=We loss communication with remote site%3
set Descripcion=%Descripcion:"=. %
set Afectado=%2 - %3
set Afectado=%Afectado:"=%
echo New Ticket on Remedy in 90 seconds (Ctrl+C Y to cancel):
echo.
echo Client: %1
echo State: %2
echo Site: %3
echo Sites: "%Afectado%"
echo Down: %4
echo Cli: %5
echo Worklog: %6
echo Summary: "%Descripcion%"
echo.
echo [ ]
C:\ARSystem\CreateEntry\sleep 22
echo [+25+ ]
C:\ARSystem\CreateEntry\sleep 22
echo [+++50+++ ]
C:\ARSystem\CreateEntry\sleep 23
echo [+++++75+++++ ]
C:\ARSystem\CreateEntry\sleep 23
echo [+++++++100++++++]
C:\ARSystem\CreateEntry\esp_createentry 10.10.10.200 myuser myus3r HPD:HelpDesk 600000000 %1 200000012 "Node Down" 200000007 "Sites" 536870914 "%Afectado%" 8 "%Descripcion%" 240000007 "We loss communication with remote site" 200000003 "Provider" 200000004 "OSI Layer 1" 200000005 "LINK" 260000126 "3" 240000008 %6 536870984 %4 536870917 %5 536870913 "0" 240000005 "myuser" 240000001 "orionNPM" 7 "0" 260000128 "5" 260000130 "0" 536870915 "0"
klog -h 127.0.0.1 -m "NEW ticket on Remedy" -L Emerg -u 6500
set Descripcion=
set Afectado=
echo Time=%time%
pause
---------------------------------------------------------------------------------------
Hi Charly,
Is it bidirectional flow ?
From Solarwinds to Remedy and Remedy to Solarwinds?
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.