Click or drag to resize

IWsMonitoringGetMonitoringServices Method

By the method GetMonitoringServices you can retrieve the list of monitoring Services purchased
By the method GetMonitoringServices you can retrieve the list of monitoring Services purchased

Namespace:  Aruba.Cloud.WsMonitoring
Assembly:  Aruba.Cloud.WsMonitoring (in Aruba.Cloud.WsMonitoring.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult<List<MonitoringServiceEntity>> GetMonitoringServices()

Return Value

Type: WsResultListMonitoringServiceEntity
Examples
By the method GetMonitoringServices you can retrieve the list of monitoring Services purchased.
/// WsMonitoring.GetMonitoringServices Method (c# .NET)
public static string GetMonitoringServices(WsMonitoringClient client)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
 // call method GetMonitoringServices 
 // obtaining a WsResultOfArrayOfMonitoringServiceEntity item
 WsResultOfArrayOfMonitoringServiceEntity result =
     client.GetMonitoringServices();

 // if the call is Success print returned values
 if (result.Success)
 {
     stringBuilder.Append("Operation ends successfully\n");

     // get Value returned from server
     MonitoringServiceEntity[] items = result.Value;

     // for each item print the information
     foreach (MonitoringServiceEntity item in items)
     {
  stringBuilder.Append("\nMonitoringServiceID: ");
  stringBuilder.Append(item.MonitoringServiceID);
     }
 }
 else
 {
     throw new ApplicationException(result.ResultMessage);
 }
    }
    catch (Exception ex)
    {
 // re-run the error
 throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
Here an example of response:
GetMonitoringServicesResponse: {
         GetMonitoringServicesResult: {
            ExceptionInfo: [System.String],
            ResultCode: 0,
            ResultMessage: [System.String],
            Success: true,
            Value: {
               MonitoringServiceEntity: {
                  CompanyID: 1,
                  CreationDate: 2015-03-10T08:46:57.963,
                  DataCenterID: 1001,
                  DeletionDate: [System.String],
                  LastUpdateDate: [System.String],
                  MaxHourNotification: 1,
                  MonitoringChecks: {
                     MonitoringCheckEntity: {
                        BaseFrequency: 300,
                        CallbackOk: false,
                        CheckResponse: [System.String],
                        CreationDate: 2015-08-18T13:23:50.43,
                        CredentialPassword: [System.String],
                        CredentialUserName: [System.String],
                        HasMailNotification: true,
                        HasSmsNotification: true,
                        Host: 192.168.12.3,
                        MonitoringCheckType: PING,
                        MonitoringCheckTypeID: 10,
                        MonitoringServiceID: 36,
                        MonitoringStatus: Deleted,
                        Name: testcheck,
                        NotCheckResponse: [System.String],
                        NotificationConsecutiveFailures: 1,
                        Port: 0,
                        SendData: [System.String],
                        TSL: false,
                        TimeOut: 5,
                        MonitoringCheckContacts: {
                           MonitoringCheckContactEntity: {
                              ContactValue: +380684524288,
                              MonitoringCheckContactID: 51,
                              NotificationTypeID: 2,
                              },
                           MonitoringCheckContactEntity: {
                              ContactValue: teststaging@staff.aruba.it,
                              MonitoringCheckContactID: 52,
                              NotificationTypeID: 1,
                              },
                              },
                        MonitoringCheckID: 60,
                        MonitoringCheckRegions: {
                           MonitoringCheckRegionEntity: {
                              AssociationDate: [System.String],
                              RegionID: 1,
                              },
                              },
                              },
                     MonitoringCheckEntity: {
                        BaseFrequency: 300,
                        CallbackOk: false,
                        CheckResponse: [System.String],
                        CreationDate: 2016-10-24T17:01:36.963,
                        CredentialPassword: [System.String],
                        CredentialUserName: [System.String],
                        HasMailNotification: false,
                        HasSmsNotification: true,
                        Host: 10.254.26.33,
                        MonitoringCheckType: PING,
                        MonitoringCheckTypeID: 10,
                        MonitoringServiceID: 36,
                        MonitoringStatus: Disable,
                        Name: satest01,
                        NotCheckResponse: [System.String],
                        NotificationConsecutiveFailures: 1,
                        Port: 0,
                        SendData: [System.String],
                        TSL: false,
                        TimeOut: 5,
                        MonitoringCheckContacts: {
                           MonitoringCheckContactEntity: {
                              ContactValue: +380684524288,
                              MonitoringCheckContactID: 67,
                              NotificationTypeID: 2,
                              },
                              },
                        MonitoringCheckID: 100,
                        MonitoringCheckRegions: {
                           MonitoringCheckRegionEntity: {
                              AssociationDate: 2016-10-24T17:02:09.773,
                              RegionID: 1,
                              },
                           MonitoringCheckRegionEntity: {
                              AssociationDate: 2016-10-24T17:02:09.787,
                              RegionID: 2,
                              },
                           MonitoringCheckRegionEntity: {
                              AssociationDate: 2016-10-24T17:02:09.787,
                              RegionID: 3,
                              },
                              },
                              },
                              },
                  MonitoringClassOfServiceID: 2,
                  MonitoringServiceID: 36,
                  MonitoringServiceStatus: Active,
                  Name: fxdvbxdfgs,
                  ProductID: 0,
                  ResourceID: 1092,
                  ResourceTypeID: 27,
                  UserID: 1,
                  },
               MonitoringServiceEntity: {
                  CompanyID: 1,
                  CreationDate: 2015-09-21T16:57:02.077,
                  DataCenterID: 1001,
                  DeletionDate: [System.String],
                  LastUpdateDate: [System.String],
                  MaxHourNotification: 12,
                  MonitoringChecks: {
                     MonitoringCheckEntity: {
                        BaseFrequency: 60,
                        CallbackOk: false,
                        CheckResponse: [System.String],
                        CreationDate: 2015-09-21T17:00:02.017,
                        CredentialPassword: [System.String],
                        CredentialUserName: [System.String],
                        HasMailNotification: true,
                        HasSmsNotification: true,
                        Host: 10.254.22.118,
                        MonitoringCheckType: PING,
                        MonitoringCheckTypeID: 10,
                        MonitoringServiceID: 61,
                        MonitoringStatus: Deleted,
                        Name: 001,
                        NotCheckResponse: [System.String],
                        NotificationConsecutiveFailures: 1,
                        Port: 0,
                        SendData: [System.String],
                        TSL: false,
                        TimeOut: 5,
                        MonitoringCheckContacts: {
                           MonitoringCheckContactEntity: {
                              ContactValue: +380684524288,
                              MonitoringCheckContactID: 53,
                              NotificationTypeID: 2,
                              },
                           MonitoringCheckContactEntity: {
                              ContactValue: teststaging@staff.aruba.it,
                              MonitoringCheckContactID: 54,
                              NotificationTypeID: 1,
                              },
                              },
                        MonitoringCheckID: 61,
                        MonitoringCheckRegions: {
                           MonitoringCheckRegionEntity: {
                              AssociationDate: [System.String],
                              RegionID: 1,
                              },
                              },
                              },
                     MonitoringCheckEntity: {
                        BaseFrequency: 60,
                        CallbackOk: false,
                        CheckResponse: [System.String],
                        CreationDate: 2015-09-21T17:01:53.723,
                        CredentialPassword: [System.String],
                        CredentialUserName: [System.String],
                        HasMailNotification: true,
                        HasSmsNotification: true,
                        Host: google.com,
                        MonitoringCheckType: PING,
                        MonitoringCheckTypeID: 10,
                        MonitoringServiceID: 61,
                        MonitoringStatus: Deleted,
                        Name: 002,
                        NotCheckResponse: [System.String],
                        NotificationConsecutiveFailures: 1,
                        Port: 0,
                        SendData: [System.String],
                        TSL: false,
                        TimeOut: 5,
                        MonitoringCheckContacts: {
                           MonitoringCheckContactEntity: {
                              ContactValue: +380684524288,
                              MonitoringCheckContactID: 55,
                              NotificationTypeID: 2,
                              },
                           MonitoringCheckContactEntity: {
                              ContactValue: teststaging@staff.aruba.it,
                              MonitoringCheckContactID: 56,
                              NotificationTypeID: 1,
                              },
                              },
                        MonitoringCheckID: 62,
                        MonitoringCheckRegions: {
                           MonitoringCheckRegionEntity: {
                              AssociationDate: [System.String],
                              RegionID: 1,
                              },
                              },
                              },
                     MonitoringCheckEntity: {
                        BaseFrequency: 60,
                        CallbackOk: false,
                        CheckResponse: [System.String],
                        CreationDate: 2015-09-22T14:51:51.793,
                        CredentialPassword: [System.String],
                        CredentialUserName: [System.String],
                        HasMailNotification: true,
                        HasSmsNotification: true,
                        Host: 10.254.22.123,
                        MonitoringCheckType: PING,
                        MonitoringCheckTypeID: 10,
                        MonitoringServiceID: 61,
                        MonitoringStatus: Deleted,
                        Name: samonitor_check1,
                        NotCheckResponse: [System.String],
                        NotificationConsecutiveFailures: 1,
                        Port: 0,
                        SendData: [System.String],
                        TSL: false,
                        TimeOut: 5,
                        MonitoringCheckContacts: {
                           MonitoringCheckContactEntity: {
                              ContactValue: +380684524288,
                              MonitoringCheckContactID: 57,
                              NotificationTypeID: 2,
                              },
                           MonitoringCheckContactEntity: {
                              ContactValue: teststaging@staff.aruba.it,
                              MonitoringCheckContactID: 58,
                              NotificationTypeID: 1,
                              },
                              },
                        MonitoringCheckID: 63,
                        MonitoringCheckRegions: {
                           MonitoringCheckRegionEntity: {
                              AssociationDate: [System.String],
                              RegionID: 1,
                              },
                              },
                              },
                              },
                  MonitoringClassOfServiceID: 4,
                  MonitoringServiceID: 61,
                  MonitoringServiceStatus: Active,
                  Name: samonitor,
                  ProductID: 0,
                  ResourceID: 2211,
                  ResourceTypeID: 27,
                  UserID: 1,
                  },
               MonitoringServiceEntity: {
                  CompanyID: 1,
                  CreationDate: 2016-03-04T14:36:03.453,
                  DataCenterID: 1001,
                  DeletionDate: [System.String],
                  LastUpdateDate: [System.String],
                  MaxHourNotification: 2,
                  MonitoringChecks: [System.String],
                  MonitoringClassOfServiceID: 1,
                  MonitoringServiceID: 76,
                  MonitoringServiceStatus: Active,
                  Name: asdasdasdsad,
                  ProductID: 0,
                  ResourceID: 3148,
                  ResourceTypeID: 27,
                  UserID: 1,
                  },
                  },
                  },
                  },
                  },
                  },
See Also