Monitoring APIs
In this section, we will have a look at the various APIs currently exposed in Logstash to retrieve runtime metric information.
By default, API binds to 127.0.0.1
and picks up the first available port in the range of 9600
-9700
. But if another instance of Logstash is running, let's say at port 9600
 , then you would need to specify the new port on which Logstash will run using following command:
bin/logstash --http.port 9602
You can get basic information when Logstash runs by opening http://localhost:9600
in your browser or run the following command from the command line:
curl -X GET http://localhost:9600?pretty
The response of the preceding command is as follows:
{ "host": "ubuntu", "version": "5.1.1", "http_address": "127.0.0.1:9600" "id" : "6d32ec3e-700b-48eb-bbc3-6a48b2b00f9e", "name" : "ubuntu", "build_date" ...