Hi Wowza folks,
We are looking a way to query http rest api to get current cpu, ram, heap and disk but we don’t find it in wowza documentation.
We tried:
http://<wowza-ip>:8087/v2/servers/_defaultServer_/monitoring/historic?actual
But no info about CPU, DISK, HEAP and RAM.
How to get this with http rest ?
Thanks
Hello Alexandre,
With query option (?) you would need to state a start and end time as described here:
https://www.wowza.com/docs/statistics-query-examples#serverstats
Bottom of this page
"Optionally, you can also include start and end time parameters in your query to return historical statistics only for that time range. Specify the start and end times in the formatstart=yyyy-mm-ddThh:mm:ss. For example, 2015-11-01T15:00:00. The following example query uses the start and end parameters:
If you remove the “?actual” from that URL you should get the full statistics as explained in the that lowest section of the example article above.
Please let us know if these recommendations still do not provide the REST-API response you are hoping to see.
Regards,
Jason Hatchett
Technical Support
Wowza Media Systems
Hello @Jason Hatchett thanks for your answer but it is not working
First, there is no “?actual” to remove from the example, because the example shows
historic?start=2015-11-01T15:00:00&end=2015-11-01T15:01:00"
I tried both:
:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/monitoring/historic?actual
and:
:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/monitoring/historic?actual
But no info from actual state of cpu ram heap and disk, furthermore, actual is empty:
<c>
<iMillis>1547541993995</iMillis>
<iChronology reference="../../b/iChronology"/>
</c>
<Entries>
<entry>
<string>actual</string>
<list/>
</entry>
<entry>
Thanks
Hello Alexandre,
- Can you please try the following instead with your user:password:
curl --digest -u "username:password" -X GET -H 'Accept:application/xml; charset=utf-8' http://<wowza-ip>:8087/v2/servers/_defaultServer_/monitoring/historic >> history.log
- If this works as it did for us in our testing, please send back the history.log file in a ticket here:
https://www.wowza.com/support/open-ticket
Ideally, we will also want to review the /conf, /manager/logs, and /logs directory (only 10 days of logs are required initially) so we can review the configuration and see what may be preventing the data form posting when requested through this REST-API call.
Regards,
Jason Hatchett
Technical Support Supervisor – Wowza Media Systems
Hello @Jason Hatchett
Yes i can grab the history.log with your command but no actual stats only average.
Ok I open a ticket now.
Thanks
I opened a wowza ticket and the answer is:
http://localhost:8087/v2/machine/monitoring/current
It will return the actual state of CPU, RAM, HEAP and DISK. Even uptime and Connections counts. Very helpful.
<CurrentMachineStatistics><ServerUptime>587272</ServerUptime><CpuIdle>99</CpuIdle><CpuUser>1</CpuUser><CpuSystem>0</CpuSystem><MemoryFree>976048128</MemoryFree><MemoryUsed>15803494400</MemoryUsed><HeapFree>4885849104</HeapFree><HeapUsed>3502758896</HeapUsed><DiskFree>225946271744</DiskFree><DiskUsed>9148878848</DiskUsed><ConnectionCount>4</ConnectionCount></CurrentMachineStatistics>