How to get server logs by using the Wowza Streaming Engine REST API

Use the Wowza Streaming Engine™ media server software REST API to retrieve and view the log files of a Wowza Streaming Engine instance.

Notes:

Contents


Get a list of server log files
View a log file
Search a log file

Get a list of server log files


View a list of log files on a server (_defaultServer_ in this example). Specify the order parameter as newestFirst (the default) or oldestFirst.

curl -X GET --header 'Accept:application/json; charset=utf-8' --header 'Content-Type:application/json; charset=utf-8' "http://localhost:8087/v2/servers/_defaultServer_/logfiles?order=newestFirst"

View a log file


View details of a specific log file (wowzastreamingengine_access.log in this example). Use the lineCount parameter to specify the total number of log lines to return:

curl -X GET --header 'Accept:application/json; charset=utf-8' --header 'Content-Type:application/json; charset=utf-8' "http://localhost:8087/v2/servers/_defaultServer_/logfiles/wowzastreamingengine_access.log?lineCount=100"

Search a log file


Search a log file for specific text by specifying the text with the search parameter:
 
curl -X GET --header 'Accept:application/json; charset=utf-8' --header 'Content-Type:application/json; charset=utf-8' "http://localhost:8087/v2/servers/_defaultServer_/logfiles/wowzastreamingengine_access.log?search=[search-for-this-string]"

Note: Several other parameters allow you to customize the information you retrieve from a log file. In Swagger, go to the servers resource and view the GET /v2/servers/{serverName}/logfiles/{logName} endpoint for more information.


If you're having problems or want to discuss this article, post in our forum.