With iControl, you can extend BIG-IP management of device functions, pool monitoring, and configuration management to a mobile PocketPC application. This tech tip helps you get started remotely managing BIG-IP devices anytime from anywhere.

Language: Perl

 

 

 

Contents


Introduction

SDK Components Referenced

Application Walkthrough

Connection Dialog

System Information

Product Information

Configuration Management

Pool Configuration

Server Statistics

Summary

Related Links



Introduction top

 

With iControl, F5 networking device features and functionality are programmatically accessible to virtually any web application. Therefore, by developing a PDA-optimized client application, administrators can remotely access F5 Networks BIG-IP devices to simplify administration, reduce errors commonly associated with command-line instructions, and speed responsiveness from anywhere in the field.

SDK Components Referenced top

 

The following components of the SDK were referenced in this sample application.

Interfaces:
    ITCMSystem::SystemInfo
    ITCMSystem::ConfigSync
    ITCMLocalLB::Node
    ITCMLocalLB::Pool
Methods:
ITCMSystem::SystemInfo
    TimeStamp            get_time              (void);
    SystemInformation    get_system_info       (void);
    ProductInformation[] get_product_info      (void);
ITCMSystem::ConfigSync
    void                 get_configuration_list(out ConfigFileEntry[] config_file_list);
    void                 save_configuration    (String filename, SaveMode save_flag);
    void                 install_configuration (String filename);
    void                 rollback_configuration(void);
    void                 delete_configuration  (String filename);
    void                 download_configuration(String config_name, 
                                                long chunk_size, 
                                                inout file_offset, 
                                                out char[] file_data, 
                                                out FileChainType chain_type);
    void                 upload_configuration  (String config_name, 
                                                char[] file_data,
                                                FileChainType chain_type);
ITCMLocalLB::Node
    void                 get_node_server_list  (out IPPortDefinition[] node_servers);
    void                 get_statistics        (IPPortDefinition node_def, 
                                                out NodeStatistics stats);
    EnabledState         get_state             (IPPortDefinition node_def);
    AvailabilitState     get_availability      (IPPortDefinition node_def);
ITCMLocalLB::Pool
    void                 get_list              (out String[] pool_names);
    void                 get_member_list       (out IPPortDefinition[] members);
Structures:
    struct SystemInformation
    {
        String system_name;
        String host_name;
        String os_release;
        String os_machine;
        String os_version;
    };
    struct ProductInformation
    {
        String product_code;
        String product_version;
        String package_version;
        String package_edition;
        String String[] product_features;
    };
    struct TimeStamp
    {
        long year;
        long month;
        long date;
        long hour;
        long minute;
        long second;
    };
    struct ConfigFileEntry
    {
        String file_name;
        String file_datetime;
    };
    struct IPPortDefinition
    {
        String address;
        long port;
    };
    struct NodeStatistics
    {
        ThruputStatistics thruput_stats;
        ConnectionStatistics connection_stats;
    };
    struct ThruputStatistics
    {
        unsigned long long bits_in;
        unsigned long long bits_out;
        unsigned long long packets_in;
        unsigned long long packets_out;
    };
    struct ConnectionStatistics
    {
        unsigned long long current_connections;
        unsigned long long maximum_connections;
        unsigned long long total_connections;
    };
Enumerations:
    enum SaveMode
    {
        SAVE_FULL,
        SAVE_COMMON,
    };
    enum FileChainType
    {
        FILE_UNDEFINED,
        FILE_FIRST,
        FILE_MIDDLE,
        FILE_UNUSED,
        FILE_LAST,
        FILE_FIRST_AND_LAST,
    };
    enum EnabledState
    {
        STATE_DISABLED,
        STATE_ENABLED,
    };
    enum AvailabilityState
    {
        AVAILABILITY_UNCHECKED,
        AVAILABILITY_DOWN,
        AVAILABILITY_UP,
        AVAILABILITY_CHECKING,
        AVAILABILITY_FORCED_DOWN,
        AVAILABILITY_ADDR_DOWN,
        AVAILABILITY_UNKNOWN,
        AVAILABILITY_MAINT,
        AVAILABILITY_ENABLED,
        AVAILABILITY_DISABLED,
        AVAILABILITY_ADDR_DISABLED,
        AVAILABILITY_PORT_DISABLED,
    };

 

 

Application Walkthrough top

 

 

Connection Dialog top

 

The first screen the application presents is the connection dialog. At this point the user will enter the address of the BIG-IP as well as the user credentials needed to establish the iControl communications.

Once credentials are esablished, they are active until the logout button is pressed on all subsequent pages.

 

 

 


 

System Information top

 

After establishing that the server address is correct and that the credentials are valid, the application connects to the ITCMSystem::SystemInfo interface to query the system version information as well as the local time.

 


The SDK components referenced in this page include:

Interfaces:
    ITCMSystem::SystemInfo
Methods:
    TimeStamp            get_time              (void);
    SystemInformation    get_system_info       (void);
Structures:
    struct SystemInformation
    {
        String system_name;
        String host_name;
        String os_release;
        String os_machine;
        String os_version;
    };
    struct TimeStamp
    {
        long year;
        long month;
        long date;
        long hour;
        long minute;
        long second;
    };

 

Product Information top

 

By clicking on the ProdInfo hyperlink the Product Information page is presented. By using the ITCMSystem::SystemInfo interface to query the prouduct information specifics of the target controller, the product features as well as product specific version information is presented.

 


The SDK components referenced in this page include:

Interfaces:
    ITCMSystem::SystemInfo
Methods:
    ProductInformation[] get_product_info      (void);
Structures:
    struct ProductInformation
    {
        String product_code;
        String product_version;
        String package_version;
        String package_edition;
        String String[] product_features;
    };

 

Configuration Management top

 

By clicking on the Config hyperlink the Configuration Management page is presented. By using the ITCMSystem::ConfigSync interface, the application is able to:
 


  • Query the list of available configurations on the controller
  • Save the current configuration on the controller
  • Delete a configuration archive on the controller
  • Download a configuration archive from the controller to the webserver hosting the appliation
  • Upload a configuration archive from the webserver hosting the application to the target controller
  • Install a configuration on the controller
  • Rollback to the previous configuration

By using these functions together a full configuration archive can be created.
 


The SDK components referenced in this page include:

Interfaces:
    ITCMSystem::ConfigSync
Methods:
    void                 get_configuration_list(out ConfigFileEntry[] config_file_list);
    void                 save_configuration    (String filename, SaveMode save_flag);
    void                 install_configuration (String filename);
    void                 rollback_configuration(void);
    void                 delete_configuration  (String filename);
    void                 download_configuration(String config_name, 
                                                long chunk_size, 
                                                inout file_offset, 
                                                out char[] file_data, 
                                                out FileChainType chain_type);
    void                 upload_configuration  (String config_name, 
                                                char[] file_data,
                                                FileChainType chain_type);
Structures:
    struct ConfigFileEntry
    {
        String file_name;
        String file_datetime;
    };
Enumerations:
    enum SaveMode
    {
        SAVE_FULL,
        SAVE_COMMON,
    };
    enum FileChainType
    {
        FILE_UNDEFINED,
        FILE_FIRST,
        FILE_MIDDLE,
        FILE_UNUSED,
        FILE_LAST,
        FILE_FIRST_AND_LAST,
    };

 

Pool Configuration top

 

If the Pool hyperlink is selected, the Pool Configuration page is presented. This contains a dropdown list containing each of the server pools configured on the device.

For the selected pool, the ITCMLocalLB::Pool interface is used to enumerate the pools application servers. The LocalLB::Node interface is then used to query the enable and availability state of each application server. These status values are displayed as green or red lights. Changing selection on the dropdown list will cause the application to refresh it's page to give statistics for the selected pool.

 


The SDK components referenced in this page include:

Interfaces:
    ITCMLocalLB::Pool
    ITCMLocalLB::Node
Methods:
    void                 get_list              (out String[] pool_names);
    void                 get_member_list       (out IPPortDefinition[] members);
    EnabledState         get_state             (IPPortDefinition node_def);
    AvailabilitState     get_availability      (IPPortDefinition node_def);
Structures:
    struct IPPortDefinition
    {
        String address;
        long port;
    };
Enumerations:
    enum EnabledState
    {
        STATE_DISABLED,
        STATE_ENABLED,
    };
    enum AvailabilityState
    {
        AVAILABILITY_UNCHECKED,
        AVAILABILITY_DOWN,
        AVAILABILITY_UP,
        AVAILABILITY_CHECKING,
        AVAILABILITY_FORCED_DOWN,
        AVAILABILITY_ADDR_DOWN,
        AVAILABILITY_UNKNOWN,
        AVAILABILITY_MAINT,
        AVAILABILITY_ENABLED,
        AVAILABILITY_DISABLED,
        AVAILABILITY_ADDR_DISABLED,
        AVAILABILITY_PORT_DISABLED,
    };

 

Server Statistics top

 

By either selecting the Servers hyperlink, or selecting a single server from within the pool configuration page, the Server Statistics page is presented.

For the selected Server, The LocalLBNode::Node interface is used to query the enabled state, availability, throughput, and connection statisitcs.

 


The SDK components referenced in this page include:

Interfaces:
    ITCMLocalLB::Node
Methods:
    void                 get_node_server_list  (out IPPortDefinition[] node_servers);
    void                 get_statistics        (IPPortDefinition node_def, 
                                                out NodeStatistics stats);
    EnabledState         get_state             (IPPortDefinition node_def);
    AvailabilitState     get_availability      (IPPortDefinition node_def);
Structures:
    struct NodeStatistics
    {
        ThruputStatistics thruput_stats;
        ConnectionStatistics connection_stats;
    };
    struct ThruputStatistics
    {
        unsigned long long bits_in;
        unsigned long long bits_out;
        unsigned long long packets_in;
        unsigned long long packets_out;
    };
    struct ConnectionStatistics
    {
        unsigned long long current_connections;
        unsigned long long maximum_connections;
        unsigned long long total_connections;
    };
Enumerations:
    enum EnabledState
    {
        STATE_DISABLED,
        STATE_ENABLED,
    };
    enum AvailabilityState
    {
        AVAILABILITY_UNCHECKED,
        AVAILABILITY_DOWN,
        AVAILABILITY_UP,
        AVAILABILITY_CHECKING,
        AVAILABILITY_FORCED_DOWN,
        AVAILABILITY_ADDR_DOWN,
        AVAILABILITY_UNKNOWN,
        AVAILABILITY_MAINT,
        AVAILABILITY_ENABLED,
        AVAILABILITY_DISABLED,
        AVAILABILITY_ADDR_DISABLED,
        AVAILABILITY_PORT_DISABLED,
    };

 

Summary top

 

The PocketiControl sample application demonstrates the use of multiple components in the iControl SDK to create an integrated monitoring application for a Wireless device. This application provides a view at the system information and configuration management as well as Pool and application server (node) monitoring and control.


It can be deployed on any webserver with perl support.

Related Links top

 

iControl Developer
http://www.perl.com
http://www.soaplite.com