From 1cde8d75d50666877d5c1deccfc20ec826e2feae Mon Sep 17 00:00:00 2001 From: Kunal Shroff Date: Thu, 26 Sep 2024 13:49:53 -0400 Subject: [PATCH 1/2] update docs --- README.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 07d6e5d..0cf8cfd 100644 --- a/README.md +++ b/README.md @@ -48,10 +48,47 @@ mvn org.springframework.boot:spring-boot-maven-plugin:run #### Check if service is running Once the service is running, the service consists of a welcome page `http://localhost:8080/Olog` -which will provide information about the version of the Olog service running, + +``` +$ curl http://localhost:9090/Olog +{ + "name" : "Olog Service", + "version" : "5.0.0-SNAPSHOT", + "elastic" : { + "status" : "Connected", + "clusterName" : "elastic-nasa", + "clusterUuid" : "QNeYpFlWRueYPH3uXGUiGw", + "version" : "co.elastic.clients.elasticsearch._types.ElasticsearchVersionInfo@79c2137f", + "elasticHost" : "localhost", + "elasticPort" : "9200" + }, + "mongoDB" : "{type=STANDALONE, servers=[{address=localhost:27017, type=STANDALONE, roundTripTime=1.2 ms, state=CONNECTED}]", + "serverConfig" : { + "maxFileSize" : 50.0, + "maxRequestSize" : 100.0 + } +} +``` + +This will provide information about the version of the Olog service running, along with information about the version and connection status of the elastic and mongo backends. +An example for testing the creation of a single test log entry with the demo credentials + +``` +curl --location --insecure --request PUT 'https://localhost:9191/Olog/logs' \ +--header 'Content-Type: application/json' \ +--header 'Authorization: Basic YWRtaW46YWRtaW5QYXNz' \ +--data '{ + "owner": "test-owner", + "source": "This is an test entry", + "title": "Tes title", + "level": "Info", + "logbooks": [{"name": "operations","owner": "olog-logs"}] + }' +``` + ### Running using Docker Compose **Prerequisites** From f39497b46417815b87d646ffa85792bf12644c66 Mon Sep 17 00:00:00 2001 From: Kunal Shroff Date: Thu, 26 Sep 2024 14:00:44 -0400 Subject: [PATCH 2/2] fix ports to match defaults --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0cf8cfd..7614930 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ mvn org.springframework.boot:spring-boot-maven-plugin:run Once the service is running, the service consists of a welcome page `http://localhost:8080/Olog` ``` -$ curl http://localhost:9090/Olog +$ curl http://localhost:8080/Olog { "name" : "Olog Service", "version" : "5.0.0-SNAPSHOT", @@ -77,7 +77,7 @@ backends. An example for testing the creation of a single test log entry with the demo credentials ``` -curl --location --insecure --request PUT 'https://localhost:9191/Olog/logs' \ +curl --location --insecure --request PUT 'https://localhost:8181/Olog/logs' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic YWRtaW46YWRtaW5QYXNz' \ --data '{