Purpose of Alert Source Client
This example shows how a client can raise and clear an alert without requesting notification of alert events. No event loop is required since asynchronous event notification is not needed to accomplish this.
Code
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 example", 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", "host02", "alarm01", null, "Emergency in computer center", null, "plan9", SPD.SPD_alarmSeverityType.SPD_critical, null, null, null); // More processing of client events... // Clear the previously raised alert: // System is windows system named host02 (in Operations Sentinel // config). alert identifier is "alarm01". // No alert qualifier. // No clear text. // No external action list. // Application name and qualifier are the defaults. // No timestamp. m_spd.SPDClearAlarm("nt_host", "host02", "alarm01", null, null, null, null, null, null); Console.Read(); // No event processing required if events are only sent, // but not received. } // function: Main } // class: MyProgram }// namespace: ClientSampleProgram
Data Flow Diagram
This illustration shows the flow of information for the alert source client.