How Do I Integrate Remedy With Argent?

Before we start, here’s a summary of the internal work flow between Argent and Remedy:

Forward Argent Console Events To Remedy

When the Argent Console forwards events to Remedy, Argent spawns a process to run the following command:

AAC_HPDScript.exe PCKEY /forward

PCKEY is the unique identifier for the event record.

Internally, the forwarding script AAC_HPD_Forward.vbs is run by Argent. The ENTRYID of the newly-created Remedy Help Desk record is saved in the Argent database for later reference.

Update The Help Desk Record When The Event Is Answered

When an event is answered in the Argent Console, Argent checks to see if the event record has a valid ENTRYID in the Argent database. If it does, Argent spawns a process to run the following command:

AAC_HPDScript.exe PCKEY /answer

PCKEY is the unique identifier for the event record.

Internally the forwarding script AAC_HPD_Resolv.vbs is run by Argent.

Change The Event Status In Argent Console

Remedy keeps a unique identifier, PCKEY. You need to define an Active Link, which is a feature in Remedy — used to run an external command line.

Conversely, you can run the following command to set the status as answered:

AAC_AnswerAlert.exe AAC_ENGINE PCKEY MEMO

AAC_AnswerAlert allows answering events outside of the Argent GUI, and is located in:

drive:\ARGENT\ArgentManagementConsole\ArgentAlertConsole

Configuring Argent Console For Remedy

Some VB programming is required. You can do it, or Argent can do it for you.

Argent provides a number of sample VB scripts. These VB scripts are located in:

drive:\ARGENT\ArgentManagementConsole\ArgentAlertConsole

The event forwarding script is AAC_HPD_Forward.vbs, and the event answering script is AAC_HPD_Resolv.vbs.

These Argent sample VB scripts work with the default Remedy Requester system.

Answering Or Closing Events By Command Line

Argent provides you with a utility to answer or close an event from command line.

The utility syntax is as follows:

AAC_AnswerAlert.exe /server=ac_server /eid=event_id “memo”

or

AAC_AnswerAlert.exe /server=ac_server /eid=event_id /purge

This utility can be executed on the Argent Console main engine, the Argent Console local client, or the Argent Console remote client.

ac_server is the name of the Argent Console engine or client.

event_id is the event id of the particular event – you see this number on the column ‘Event Id‘ in the Argent Console A1B screen.

“memo” is the text for event answering. Always put it in double quotes.

The parameter purge can be used to close the event, by deleting the event from the Argent database.

Programming VB Scripts To Integrate Remedy With Argent

The Argent scripts are written in VBScript.

Argent extends the VBScript engine by providing the following properties and methods.

Properties

UniqueId
Type: Long Integer (Read-Only)
Description: This is the unique identifier for the event record in the Argent Console
AlertTime
Type: Date/Time (Read-Only)
Description: The date/time the event occurred
EventTime
Type: Date/Time (Read-Only)
Description: The date/time the event was added to the Argent Console
Relator
Type: String (Read-Only)
Description: Name of the Argent Relator
Rule
Type: String (Read-Only)
Description: Name of the Argent Rule
RuleCategory
Type: String (Read-Only)
Description: The Argent Rule type
Machine
Type String (Read-Only)
Description: The machine or IP device the event describes
Alias
Type: String (Read-Only)
Description: The alias for the IP device
Priority
Type: Short Integer (Read-Only)
Description: Priority setting: 0 for low priority, 1 for medium priority, 2 for critical events
Summary
Type: String (Read-Only)
Description: Brief description of the event
Detail
Type: String (Read-Only)
Description: Detailed description of the event
Comment
Type: String (Read-Only)
Description: The comment on the Argent Console
RequestServer
Type: String (Read-Only)
Description: The machine requesting event to be fired; generally an Argent monitoring engine
RequestAccount
Type: String (Read-Only)
Description: The account requesting the event to be fired; generally the service account

of the Argent monitoring engine

Status
Type: Boolean (Read-Only)

Description: TRUE = event is answered
  FALSE = event is still pending
Operator
Type: String (Read-Only)
Description: The W200x account who answered or placed the event in maintenance mode
Memo
Type: String (Read-Only)
Description: The text the operator put in the memo field of the event record
EntryId
Type: String (Read and Write)
Description: The Remedy entry ID for help desk records

Methods

PrintText
Syntax: PrintText text, b
Description: Prints text to the debug window in IDE, and writes the text to service logs

  The value ‘b’ is a Boolean value
  TRUE = Print error message printed in red
  FALSE = Print informational message in blue
PrepareSchema
Syntax: bSuccess = PrepareSchema (schema)
Description: Verifies the existence of the schema/form and reads the field information
  Schema is the schema/form name — Must be a base schema/form
ReleaseSchema
Syntax: ReleaseSchema schema
Description: Releases memory allocated for a prepared schema
  Don’t call until the schema/form is no longer needed
  This statement is optional, as the allocated resource will be freed when the Argent Console engine closes the VB script engine
ReadEntryData
Syntax: bSuccess = ReadEntryData (schema, entry_id)
Description: Reads the record of the schema/form uniquely identified by the entry ID
GetSchemaFieldType
Syntax: lType = GetSchemaFieldType (schema, field)  
Description: Returns the field type for the specific field in the schema/form  
  #define REMEDY_FIELD_TYPE_UNSUPPORTED -1L
  #define REMEDY_FIELD_TYPE_NONE 0L
  #define REMEDY_FIELD_TYPE_TEXT 1L
  #define REMEDY_FIELD_TYPE_LONG 2L
  #define REMEDY_FIELD_TYPE_DOUBLE 3L
  #define REMEDY_FIELD_TYPE_DATETIME 4L
ReadFieldText
Syntax: value = ReadFieldText (schema, field)
Description: Reads the text value of the field in the schema/form
ReadFieldLong
Syntax: value = ReadFieldLong (schema, field)
Description: Reads the long integer value of the field in the schema/form
ReadFieldDateTime
Syntax: value = ReadFieldDateTime (schema, field)
Description: Reads the date/time value of the field in the schema/form
ReadFieldDouble
Syntax: value = ReadFieldDouble (schema, field)
Description: Reads the numeric value of the field in the schema/form
SetFieldText
Syntax: bSuccess = SetFieldText (schema, field, value)
Description: Sets the text value for the field in the schema/form
  The value is not saved until the method UpdateEntry is called
SetFieldLong
Syntax: bSuccess = SetFieldLong (schema, field, value)
Description: Sets the long integer value for the field in the schema/form
  The value is not saved until the method UpdateEntry is called
SetFieldDouble
Syntax: bSuccess = SetFieldDouble (schema, field, value)
Description: Sets the numeric value for the field in the schema/form
  The value is not saved until the method UpdateEntry is called
SetFieldDateTime
Syntax: bSuccess = SetFieldDateTime(schema, field, value)
Description: Sets the date/time value for the field in the schema/form
  The value is not saved until either CreateNewEntry or UpdateEntry are called
CreateNewEntry
Syntax: EntryId = CreateNewEntry(schema)
Description: Creates a new record
  The returned entry ID should ALWAYS be saved into the property
  EntryId — so it is stored in the event record of the Argent Console
UpdateEntry
Syntax: bSuccess = UpdateEntry(schema, entry_id)
Description: Updates the entry information
  The entry is uniquely identified by the value of entry_id
QuerySchema
Syntax: entry_id = QuerySchema(schema, query)
Description: It reads the first record of the schema matching the
  criteria specified in parameter query
HasInternalError
Syntax: bErr = HasInternalError
Description: TRUE = Error in the VB script.