ipm7Status (ipMonitor 7.x Status Soap Interface)
 
Formal Definition: Refer to the WSDL Service Description.
   
The ipMonitor 7.x Status Soap Interface provides secure access over SSL (if chosen as the protocol) to real-time status information. Status information can be made readily available to any backend solution with SOAP. The services provided by ipMonitor 7.x are described in WSDL (Microsoft's Web Services Description Language) and are easily used with the Microsoft .NET platform.
 
Methods (C#):
  • public rtGroup[] GetGroups();
  • public bool GetGroup( long id, out rtGroup info );
  • public rtMonitor[] GetMonitors( long groupid, bool bTroubleOnly );
  • public bool GetMonitor( long id, out string name, out string type, out rtStatus status );
Using the ipMonitor 7.x Status WSDL in Visual Studio .NET
  1. Save WSDL to your hard drive
  2. In the WSDL, locate and update the soap:address "http://youripm7addr/" to reflect your ipMonitor 7.x instance
  3. In your C# or ASP.NET project, add a web reference and specify the location of your Modified WSDL
  4. When naming the web reference, use ipm7status
  5. The following c# code will assist with testing the generated SoapHttpClientProtocol
     
    // application initialization abbreviated
    
    ipm7status.ipm7Status proxy = new ipm7status.ipm7Status();
    
    Regex r = new Regex("^(.*)soap/status.asmx$", RegexOptions.IgnoreCase );
    Match m = r.Match( proxy.Url );
    
    if( m.Success )
    {
      CredentialCache cache = new CredentialCache();
      cache.Add( new Uri( m.Captures[0].Value ), "Digest", new NetworkCredential( SecurelyStoredAccount, SecurelyStoredPassword ) );
      proxy.Credentials = cache;
    
      foreach( ipm7status.rtGroup g in proxy.GetGroups() )
      {
        Console.WriteLine( "Group Name[{0}] Group Status[{1}]", g.name, g.status );
      }
    }
    

Enumerations and Structures (C#):

  • public enum rtStatus
    {
      up,               // "ok" or "listening"
      warn,             // experienced failures, yet not sent alerts
      down,             // experienced failures, and sent alerts
      lost,             // experienced failures, and sent all alerts possible
      suspended,        // actively suspended by an administrator
      disabled,         // disabled and not available for testing
      maintenance,      // placed within a state of suspension by scheduled maintenance
      uninitialized,    // recently "unsuspended" or not used after service restart
      unknown
    }
  • public class rtGroup
    {
      public long           id;                  // id of the Group
      public rtStatus       status;              // aggregated status of all the members and depends
      public string         name;                // name of the Group
      public bool           isroot;              // Global Group, if true
      public System.UInt32  m_total;             // total number of members
      public System.UInt32  d_total;             // total number of depends
      
      public System.UInt32  m_lost;              // number of lost members in Group (valid if m_lostSpecified)
      public bool           m_lostSpecified;     // * artifact of wsdl serialization
      public System.UInt32  d_lost;              // number of lost depends in Group (valid if d_lostSpecified)
      public bool           d_lostSpecified;     // * artifact of wsdl serialization
      public System.UInt32  m_down;              // number of down members in Group (valid if m_downSpecified)
      public bool           m_downSpecified;     // * artifact of wsdl serialization
      public System.UInt32  d_down;              // number of down depends in Group (valid if d_downSpecified)
      public bool           d_downSpecified;     // * artifact of wsdl serialization
      public System.UInt32  m_warn;              // number of warn members in Group (valid if m_warnSpecified)
      public bool           m_warnSpecified;     // * artifact of wsdl serialization
      public System.UInt32  d_warn;              // number of warn depends in Group (valid if d_warnSpecified)
      public bool           d_warnSpecified;     // * artifact of wsdl serialization
      public System.UInt32  m_ok;                // number of ok members in Group (valid if m_okSpecified)
      public bool           m_okSpecified;       // * artifact of wsdl serialization
      public System.UInt32  d_ok;                // number of ok depends in Group (valid if d_okSpecified)
      public bool           d_okSpecified;       // * artifact of wsdl serialization
      public System.UInt32  m_offline;           // number of offline members in Group (valid if m_offlineSpecified)
      public bool           m_offlineSpecified;  // * artifact of wsdl serialization
      public System.UInt32  d_offline;           // number of offline depends in Group (valid if d_offlineSpecified)
      public bool           d_offlineSpecified;  // * artifact of wsdl serialization
    }
  • public class rtMonitor
    {
      public long     id;           // id of the Monitor
      public rtStatus status;       // status of the Monitor
      public string   name;         // name of the Monitor
      public string   type;         // type of the Monitor
      public bool     isdepend;     // is a depend of the specified Group, if true
      public bool     ismember;     // is a member of the specified Group, if true
    }