Forum Discussion
Hello Satoshi,
Thank you very much for you're detailled answer.
I tested your solution and it looks great when I work on monitors hosted on the Common partition, but when I try on monitors hosted on user defined partitions it fails :
curl -sku admin:password https://10.200.2.92/mgmt/tm/ltm/monitor/https/~PART1~https_1_0_443/stats?ver=12.1.3 | python -m json.tool
{
"apiError": 1,
"code": 404,
"errorStack": [],
"message": "Object not found - /PART1/https_1_0_443"
}
Am I doing it the right way ? Is there any workaround ?
PS : The object /PART1/https_1_0_443 actually exists
- Dominik_312933Apr 18, 2018Nimbostratus
Yes, I am experiencing the same issue.
A GET request to
https://f5.intern/mgmt/tm/ltm/monitor/gateway-icmp/~Common~gateway_icmp/stats
triggers the expected response (containing the "apiRawValues" field).
However, a GET request to
https://f5.intern/mgmt/tm/ltm/monitor/http/~PART1~http_mon_1/stats
triggers 404 Object not found.
On the other hand a monitor in a custom partition, wrapped in an iApp works as expected. A GET request to
https://f5.intern/mgmt/tm/ltm/monitor/http/~PART1~MYAPP.app~MYAPP_http_mon_2/stats
triggers the expected response (containing the "apiRawValues" field).
This is a really strange behavior, whereas I would be very interested in a workaround other than using an iApp.
- Satoshi_ToyosawApr 19, 2018Historic F5 Account
Perhaps the monitor is not attached to a pool.
Change to a folder (partition) root@(ltm1311)(cfg-sync Standalone)(Active)(/Common)(tmos) cd /TestFolder/ Verify the monitor in this partition. Yes, it's there. root@(ltm1311)(cfg-sync Standalone)(Active)(/TestFolder)(tmos) list ltm monitor http TestMonitor ltm monitor http TestMonitor { adaptive disabled defaults-from /Common/http destination *:* interval 5 ip-dscp 0 partition TestFolder recv none recv-disable none send "GET /HelloWorld.html\r\n" time-until-up 0 timeout 16 } Can I see the stats? No. root@(ltm1311)(cfg-sync Standalone)(Active)(/TestFolder)(tmos) show ltm monitor http TestMonitor Check the pool. I don't have any pool on this folder. root@(ltm1311)(cfg-sync Standalone)(Active)(/TestFolder)(tmos) list ltm pool Let's create one. Attach the monitor on the /TestFolder. root@(ltm1311)(cfg-sync Standalone)(Active)(/TestFolder)(tmos) create ltm pool TestPool monitor TestMonitor members add { /Common/CentOS-internal20:80 } Double check it is there. root@(ltm1311)(cfg-sync Standalone)(Active)(/TestFolder)(tmos) list ltm pool ltm pool TestPool { members { /Common/CentOS-internal20:http { address 10.200.20.137 session monitor-enabled state up } } monitor TestMonitor partition TestFolder } Now show me the stats root@(ltm1311)(cfg-sync Standalone)(Active)(/TestFolder)(tmos) show ltm monitor http TestMonitor -------------------------------------- LTM::Monitor /TestFolder/TestMonitor -------------------------------------- Destination: 10.200.20.137:80 State time: up for 0hr:0min:8sec | Last error: N/A @2018.04.19 15:49:14
Now check the monitor stats via iControl REST
curl -sku admin:admin https://localhost/mgmt/tm/ltm/monitor/http/~TestFolder~TestMonitor/stats | sed 's/\\n/\n/g' {"kind":"tm:ltm:monitor:http:httpstats","generation":0,"selfLink":"https://localhost/mgmt/tm/ltm/monitor/http/~TestFolder~TestMonitor/stats?ver=13.1.0","apiRawValues":{"apiAnonymous":"-------------------------------------- LTM::Monitor /TestFolder/TestMonitor -------------------------------------- Destination: 10.200.20.137:80 State time: up for 0hr:8mins:7sec | Last error: N/A @2018.04.19 15:49:14