This document includes cluster dependent URL’s. Each URL has a variable part (in Italic). Please match this part with a row entry within the following table. Copy the table row entry located under the column that matches the top level domain of your Coralogix account (.com, .in etc.). Replace the variable part of the URL with this entry.
.com | .in | |
---|---|---|
Elasticsearch-API | https://coralogix-esapi.coralogix.com:9443 | https://es-api.app.coralogix.in:9443 |
SSL Certificates | https://coralogix-public.s3-eu-west-1.amazonaws.com/certificate/Coralogix-EU.crt | https://coralogix-public.s3-eu-west-1.amazonaws.com/certificate/Coralogix-IN .pem |
Cluster URL | coralogix.com | app.coralogix.in |
Coralogix exposes an API that allows you to send your logs from basically anywhere, here is how:
Schema
Endpoint Details
URL | https://api.Cluster URL/api/v1/logs |
HTTP Method | POST |
Content-Type | application/json |
*We recommend sending logs in “bulks” or “batches” to minimize network calls.
**If you are using Ajax (or similar technology) you might need to send the data with JSON.stringify())
POST Body
Required | Property Name | Property Type | Note |
---|---|---|---|
Yes | privateKey | UUID | |
Yes | applicationName | string | usually used to separate environments |
Yes | subsystemName | string | usually used to separate components |
computerName | string | ||
Yes | logEntries | array of logs |
Log
Required Property Name Property Type Notes
Yes timestamp number UTC milliseconds since 1970 (supports sub millisecond via a floating point)
Yes severity number 1 – Debug, 2 – Verbose, 3 – Info, 4 – Warn, 5 – Error, 6 – Critical
Yes text string
category string
className string
methodName string
threadId string
Coralogix rest API implementation Example:
{ "privateKey": "", "applicationName": "*insert desired application name*", "subsystemName": "*insert desired subsystem name*", "computerName": "*insert computer name*", "logEntries": [ { "timestamp": 1457827957703.342, "severity": 4, "text": "Encountered an error while registering the user john123", "category": "DAL", "className": "UserManager", "methodName": "RegisterUser", "threadId": "a-352" }, { "timestamp": 1457827957703.342, "severity": 3, "text": "{\"key1\":\"val1\",\"key2\":\"val2\",\"key3\":\"val3\",\"key4\":\"val4\"}", "category": "DAL", "className": "UserManager", "methodName": "RegisterUser", "threadId": "a-352" } ] }
** If you are sending a JSON payload note that you should escape it like in the above example and then insert it into the text field (text field should be sent as string)
** Make sure you use UTC time in milliseconds
Need help? We love to assist our customers, simply book your implementation session, and we will walk you through, step by step.