ipMonitor 7.x Soap Sample: ConvertMonAddress
 
Sample Description:
   
The ConvertMonAddress sample is a .Net Windows Form project written with C# that uses SOAP to communicate with an ipMonitor 7.x instance in order to demonstrate how to change configuration settings through SOAP.

This sample demonstrates how 3rd party applications can interact with ipMonitor in order to view and edit configuration elements such as monitors. Other applications may be created to perform many other tasks.

The different configuration elements manageable through SOAP are monitors, groups, alerts, maintenance profiles and reports. The ipMonitor SOAP interface allows for adding, editing, viewing and deleting these configuration elements. Each item is represented in XML format within ipMonitor. An option on the top menu of the ipMonitor interface allows you to popup XML while editing a configuration item such as a monitor. Viewing the XML will allow you to gain a better understanding of the format of the configuration elements.

 
With this sample, you can:
  • Log in to ipMonitor 7 through SOAP in a .Net Windows Form C# application.
  • Optionally use SSL.
  • Convert IP Addresses for monitors to Domain Names and back.
 
Downloads:
 
ipMonitor 7 SOAP Methods Used (C#):
Project Discussion:
 

  • For simplicity, this project consists of two forms which contain all the application logic.

  1. The application first starts with a login screen. It then asks for connection properties and ipMonitor Username and Password.
  2. If Using SSL, the certificate must not return errors such as incorrect common name.
  3. Monitors whose Domain names or IP Addresses can not be resolved do not show in the selectable list. Due to the timeout length of GetHostByAdress functions, this sample may slow down considerably if there are many unresolvable IP Addresses.
  4. Monitor configuration is stored as XML. XPATH and regular expressions are used to locate requested attributes.

Our goal for this project is to showcase how to make configuration changes in ipMonitor through SOAP using a .Net Windows Form Application written in C#. The first form in the project demonstrates how to connect to the ipMonitor 7 server.

Once logged in, the following window will appear. This form displays monitors whose addresses may be converted between the IP Address and Domain name. Select the monitors to be converted and click on Go. The application will make the necessary changes to the monitors' XML and return the changes via SOAP.

 
SOAP Sample Breakdown, by file:
 

ipm7_cvtaddress.csproj
The C# project that contains everything needed to compile the Windows Form C# application. Note: you will likely have to change the webinfo file to correspond to the location of centralstatus.csproj.

login.cs
The Window Form implementing the login logic.

convert.cs
The applications' Main Windows Form. This form contains all the application logic once logged in. The application performs a SOAP request to retrieve all the monitor configuration objects in XML. The code then filters the monitors depending on whether they use IP Addresses or Domain Names. Clicking the Go button causes the changes to be made on the ipMonitor server.

ipm7Settings.cs
Object for storing the connection settings used by application.

convert.resx
.Net Xml resource file.

login.resx
.Net Xml resource file.

Reference.cs
The project references.

App.ico
The applications icon.

AssemblyInfo.cs
.Net assembly info file.

app.config
Windows Application configuration file.