一、功能简介
📬 F5 LTM 配置导出到 excel 表格。
📪 通过指定 excel 表格配置 F5 LTM。
🪧 该工具目前支持 BIGIP 12 版本以上。
🌈 导出导出配置的表格格式,暂时只支持
.xlsx
格式,后续会继续更新!二、工具下载
⛲ windows 版本工具下载地址:传送门🚪
⛺ Linux 版本工具下载地址:传送门🚪
⌛Github下载地址:传送门🚪
三、F5 LTM 配置导出到 excel 表格
1、表格输出效果
参数说明
参数 | 说明 |
---|---|
partition | 分区名称 |
virtualservername | 虚拟服务名称 |
destination | 虚拟服务地址 |
description | 虚拟服务描述信息 |
source | 虚拟服务源地址 |
s_ip_protocol | 虚拟服务协议 |
profiles | 虚拟服务使用的 profile,多个用空格分隔开。 |
pool_name | pool 名称 |
pool_members | pool 成员信息,多个成员之间用空格分开。 |
snat_type | 源地址转换类型 |
snat_pool | 源地址转换地址池 |
irules | 调用的 iRule |
2、运行程序
程序语法:
C:\Users\wangh>C:\Users\wangh\Desktop\ltm.exe -h
ltm controls the f5 bigip devices.
Usage:
ltm [flags]
ltm [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
export Read f5 device data and write to excel sheet
help Help about any command
import Read the excel configuration and load it to the f5 device
version Show ltm version
Flags:
-h, --help help for ltm
Use "ltm [command] --help" for more information about a command.
配置导出语法:
C:\Users\wangh>C:\Users\wangh\Desktop\ltm.exe export -h
Read f5 device data and write to excel sheet
Usage:
ltm export [flags]
Flags:
-f, --file string Specifies an alternative configuration file (default "/tmp/create.xlsx")
-h, --help help for export
-a, --host string The host ip address (default "127.0.0.1")
-p, --password string Password for the given user (default "admin")
-s, --sheet string Specifies the table name of the workbook (default "Sheet1")
-u, --username string The username of the host (default "admin")
执行示例:
注意:输出表格格式必须为 .xlsx
格式。
MacOS 和 Linux 版本再次不做演示了,用法几乎一致,有需要的 传送门
四、通过指定 excel 表格配置 F5 LTM
1、表格展示
表格参数说明
参数 | 说明 |
---|---|
virtual_name | 虚拟服务名称 |
vs_destination | 虚拟服务目的地址 |
vs_ip_protocol | 虚拟服务协议,可选参数:tcp udp |
profiles | 指定配置 profiles ,可选参数 http tcp fastL4 ... |
translate_address | 地址转换 , 可选参数 enabled disabled |
translate_port | 端口转换, 可选参数 enabled disabled |
snat_type | 源地址转换类型 , 可选参数 automap none ,暂不支持指定 snatpool 。 |
persistence | 会话保持,可选参数 source_addr dest_addr hash none cookie |
pool_name | pool 名称 |
pool_member | pool 成员,多个成员可以使用回车或者空格进行分隔。示例:10.1.1.10:80 |
pool_monitor | pool 健康检查,可选参数 tcp gateway_icmp http ... |
pool_lbmode | pool 成员负载均衡方式 ,可选参数 round-robin least-connections-member ... |
2、表格下载
⛺ 表格下载地址: 传送门🚪
3、运行程序
程序语法
C:\Users\wangh>C:\Users\wangh\Desktop\ltm.exe -h
ltm controls the f5 bigip devices.
Usage:
ltm [flags]
ltm [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
export Read f5 device data and write to excel sheet
help Help about any command
import Read the excel configuration and load it to the f5 device
version Show ltm version
Flags:
-h, --help help for ltm
Use "ltm [command] --help" for more information about a command.
配置导入语法
C:\Users\wangh>C:\Users\wangh\Desktop\ltm.exe import -h
Read the excel configuration and load it to the f5 device
Usage:
ltm import [flags]
Flags:
-f, --file string Specifies an alternative configuration file (default "/tmp/create.xlsx")
-h, --help help for import
-a, --host string The host ip address (default "127.0.0.1")
-p, --password string Password for the given user (default "admin")
-s, --sheet string Specifies the table name of the workbook (default "Sheet1")
-u, --username string The username of the host (default "admin")
执行示例
结果验证
注意
- 表格格式必须为
xlsx
格式。且列的顺序不可变更 - 所有表格内容必须填写完整。不许有空的格子。
五、致谢
🌞 项目作者:lefeck
🪐 如果该项目帮助了您,您的🌟是作者最大的动力!
请问 这是什么程序源码啊