To get started, you need the following:
A client coded in C#, such as the example in this section.
In This Example
In this example, the client raises an alert, which is displayed in an Alerts window of Operations Sentinel Console.
How to Code the Example
The example uses a client that is coded in C# language, as follows:
using System; using Spo.SPDlib; namespace ExamplesOfAPIUsage { class MyAlertPrgram { // create a SPD class instance static SPD m_spd = new SPD(); // Additional class member attributes declaration... [STAThread] static void Main(string[] args) { // Initialize the API. // Application name = "alert sender example" // No application qualifier. m_spd.SPDInitClient("alert sender", null); // Client processing... // Send an alert: // System is windows system named host02 (in Operations Sentinel // config). Alert identifier is "alarm01". // No alert qualifier. // Alert text is "Emergency...". // No alert help text (default help file is "alarm01"). // External action is "plan9". // Severity is critical. // Application name and qualifier are the defaults. // No timestamp. m_spd.SPDSendAlarm("host", " host_name", "alarm01", null, "Emergency in computer center", null, "plan9", SPD.SPD_alarmSeverityType.SPD_critical, null, null, null); // No event processing required if events are only sent, but not // received. Console.Read(); } // function: Main } // class: MyProgram }
Data Flow Diagram
The following figure shows the flow of information for the alert source client.