Forum Discussion
How do I read the send string for a monitor using powershell icontrol?
Hi Robbie,
Are you open to use another scripting approach? If so, I'd recommend using iControlREST. It's rather easy, reasonably documented and can be used to accomplish most automation tasks.
It's easy to get started with it using curl and/or the postman plugin for chrome. You can then use something like python to automate...
For your query the iControlREST query can be performed using the following command:
curl -s -k -u admin:admin -H "Content-Type: application/json" -X GET https://a.b.c.d/mgmt/tm/ltm/monitor/http?$select=name,send
This returns the following sample output for me:
{
"kind": "tm:ltm:monitor:http:httpcollectionstate",
"selfLink": "https://localhost/mgmt/tm/ltm/monitor/http?$select=name%2Csend&ver=11.6.0",
"items": [
{
"name": "http",
"send": "GET /\\r\\n"
},
{
"name": "http_head_f5",
"send": "HEAD / HTTP/1.0\\r\\n\\r\\n"
},
{
"name": "m_http",
"send": "GET /\\r\\n"
}
]
}
In the above, m_http is a custom http monitor I created. You can clearly see the monitor name and send string.
Hope this helps,
Cheers,
Bonny
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