license.json
Commercial software
gecholog
is a licensed proprietary commercial software under commercial license use. For more information about licensing visit License.
Validate the license
Run this command to validate the license.json:
docker exec gecholog ./gl -o /app/conf/gl_config.json --license
az container exec --resource-group <RESOURCE_GROUP> --name gecholog --container-name gecholog --exec-command "./gl -o /app/conf/gl_config.json --license"
To produce this output
{
"time": "2024-02-19T21:30:52.117444599Z",
"level": "INFO",
"source": {
"function": "main.setupConfig",
"file": "/app/cmd/gl/main.go",
"line": 2371
},
"msg": "license is valid and not expired",
"service": "gl",
"days_until_expiration": 40
}
Warning of license expiration
If there is less than 30 days left of the license when running the ./gl --license
command, an additional warning message will be printed:
{
"time": "2024-02-20T08:48:33.738727681Z",
"level": "INFO",
"source": {
"function": "main.setupConfig",
"file": "/app/cmd/gl/main.go",
"line": 2371
},
"msg": "license is valid and not expired",
"service": "gl",
"days_until_expiration": 7
}
{
"time": "2024-02-20T08:48:33.738876284Z",
"level": "WARN",
"source": {
"function": "main.setupConfig",
"file": "/app/cmd/gl/main.go",
"line": 2382
},
"msg": "less than 30 days until the license expires",
"service": "gl",
"days_until_expiration": 7
}
Expiration date from downloading license.json
To find the expiration date for your license, you can download the license.json
file from the container or mount the directory /app/conf/
as described here. To download it:
docker cp gecholog:/app/conf/license.json .
The license.json
file looks like this for an expiration date 30th November 2023:
{
"user_info": "myCompany",
"gateway_id": "ACC02341",
"expiration_date": "2023-11-30",
"signature": "RmFjZWJvb2tPQVVUSF...RPS0VuQ3J5cHRvKysrKysr"
}
Expiration date via service bus interface
If you don't have access to the filesystem of the container you can check the days left of the license from the isalive
service of gecholog
via the service bus interface. Since gecholog
is using the light-weight service bus nats, we can use the nats-cli
to check status (download options: natscli).
nats req -s "changeme@localhost" "coburn.gl.isalive" "any message"
Where changeme
is your nats access token specified in the NATS_TOKEN
or PASSWORD
environment variable. And the expected response looks like this
{
"Status":200,
"Body":{
"LastTransactionID":"ACC02341_1699375179000751883_1242_0",
"LastIngressTime":"",
"CountRequests":1243,
"GatewayID":"ACC02341",
"LicenseDaysUntilExpiration":22,
"LicenseExpirationDate":"2023-11-30T00:00:00Z",
"LastError":"",
"LastErrorTime":""
},
"Error":null
}
NOTE: This example is assuming the
gecholog
container is accessible onlocalhost:4222
and thattopic_exact_isalive
is configured to coburn.gl.isalive in the/app/conf/gl_config.json
file.
Container log 30-day expiration warning
When the license has less than 30 days to expire the gecholog
container log will get a daily message indicating the number of days remaining of the license. You can find this by filtering the container log either on level==WARN
or via .days_until_expiration
.
Find the warnings using jq
:
docker logs gecholog | jq --slurp '.[] | select(.level=="WARN")'
az container logs --resource-group <RESOURCE_GROUP> --name gecholog --container-name gecholog | jq --slurp '.[] | select(.level=="WARN")'
Or directly by filtering on days_until_expiration
using jq
:
Find the warnings using jq
:
docker logs gecholog | jq --slurp '.[] | select(.days_until_expiration)'
az container logs --resource-group <RESOURCE_GROUP> --name gecholog --container-name gecholog | jq --slurp '.[] | select(.days_until_expiration)'
which prints lines like these:
{
"time": "2024-02-20T07:38:53.001002588Z",
"level": "WARN",
"source": {
"function": "main.monitorLicense",
"file": "/app/cmd/gl/main.go",
"line": 1909
},
"msg": "license is about to expire",
"service": "gl",
"days_until_expiration": 7
}
When license expires
The gl
service in the gecholog
container will stop working when the license expires and will not start with an expired license.
The ./gl --license
command and the container logs and will show this message on startup:
{
"time": "2024-02-20T08:59:10.857763349Z",
"level": "ERROR",
"source": {
"function": "main.setupConfig",
"file": "/app/cmd/gl/main.go",
"line": 2310
},
"msg": "error validating license",
"service": "gl",
"error": "invalid signature"
}
Uploading license.json file
When you have received a new valid license.json
file from us, follow the steps here to upload it to /app/conf/license.json
.