Forum Discussion
POSTMAN multiple pool creation
Hi mihaic
Can you please share the script of VIP for the postman please along with the pool member? Is it possible to create postman for health mon.
Appreciate for your support
Certainly!
Here’s how you can create F5 Virtual Servers (VIPs), Pools, and Health Monitors using POSTMAN.
Creating a Pool with Members
- Create a new POST request in POSTMAN.
- Set the URL to:
https://<BIG-IP IP address>/mgmt/tm/ltm/pool
- Authorization: Use Basic Auth and enter your BIG-IP credentials.
- Body: Select raw and JSON format. Use the following JSON payload:
{
"name": "example_pool",
"partition": "Common",
"loadBalancingMode": "least-connections-node",
"monitor": "/Common/tcp",
"members": [
{"name": "192.168.1.1:80"},
{"name": "192.168.1.2:80"}
]
}
Creating a Virtual Server (VIP)
- Create a new POST request in POSTMAN.
- Set the URL to:
https://<BIG-IP IP address>/mgmt/tm/ltm/virtual
- Authorization: Use Basic Auth and enter your BIG-IP credentials.
- Body: Select raw and JSON format. Use the following JSON payload:
{
"name": "example_vip",
"partition": "Common",
"destination": "192.168.1.100:80",
"mask": "255.255.255.255",
"pool": "/Common/example_pool",
"profiles": [
{"name": "/Common/http"}
]
}
Creating a Health Monitor
- Create a new POST request in POSTMAN.
- Set the URL to:
https://<BIG-IP IP address>/mgmt/tm/ltm/monitor/http
- Authorization: Use Basic Auth and enter your BIG-IP credentials.
- Body: Select raw and JSON format. Use the following JSON payload:
{
"name": "example_http_monitor",
"partition": "Common",
"interval": 5,
"timeout": 16,
"send": "GET / HTTP/1.1\r\nHost: example.com\r\nConnection: Close\r\n\r\n",
"recv": "HTTP/1.1 200 OK"
}
Using POSTMAN Collection Runner
To automate the creation of multiple objects, you can use POSTMAN’s Collection Runner with a data file:
- Create a JSON file with your configurations. For example, pools.json:
[
{
"name": "example_pool1",
"partition": "Common",
"loadBalancingMode": "least-connections-node",
"monitor": "/Common/tcp",
"members": [
{"name": "192.168.1.1:80"},
{"name": "192.168.1.2:80"}
]
},
{
"name": "example_pool2",
"partition": "Common",
"loadBalancingMode": "round-robin",
"monitor": "/Common/tcp",
"members": [
{"name": "192.168.1.3:80"},
{"name": "192.168.1.4:80"}
]
}
]
- Set up POSTMAN:
- Create a new POST request for pool creation.
- In the Pre-request Script tab, add:
- In the Body tab, use {{requestBody}}.
- Run the Collection:
- Use the Collection Runner to run the collection with the pools.json file. POSTMAN will iterate over each entry and send individual requests.
By following these steps, you can efficiently create VIPs, pools, and health monitors on your F5 BIG-IP system using POSTMAN.
[1]: Using Postman for Creating F5 Virtual Servers and Pools [2]: Node/Pool/VIP Creation Script (from csv input) [3]: How to create custom HTTP monitors with Postman, curl, and Python
References
[1] Node/Pool/VIP Creation Script (from csv input) | DevCentral - F5, Inc.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
