Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleGateway Settings
linenumberstrue
{
  "gateway": {
    "clusterid": 0,
    "segmentid": 0,
    "environmentid": 0,
    "group": "default",
    "iothreads": 4,
    "workerthreads": 20,
    "http2": true,
    "max.entity.size": 67107840,
    "max.header.size": -1,
	"idle.timeout": -1,
	"norequest.timeout": -1,
	"request.parse.timeout": -1,
	"max.parameters": -1,
	"max.headers": -1,
	"max.cookies": -1,
	"max.buffered.request.size": -1,
	"always.add.date.header": true,
    "sslaccelerator": {
      "address": "10.1.2.3",
      "header.client.ip": "X-Forwarded-For",
      "header.client.port": "X-Forwarded-Port",
      "header.secure": "X-SSL-Cipher",
      "header.client.certificate": "X-Client-Cert"
    },
    "accesslog.pattern": "%{REMOTE_ADDR}(:%{REMOTE_PORT}) - "%{REMOTE_USER}" %{TIME_LOGFORMAT} "%{ORIGINAL_REQUEST}" %{HTTP_RESPONSECODE} %{HTTP_BYTESSENT} %{HTTP_RESPONSETIME} "%{HTTP_REFERER}",
    "accesslog.type": "log",
    "accesslog.category": "accesslog",
    "accesslog.directory": "/var/log",
    "accesslog.basename": "accesslog",
    "accesslog.suffix": "log",
    "dynatrace.webserver.name": "Ceptor",
    "dynatrace.application.id": "Ceptor Gateway",
    "dynatrace.context.root": "/",
    "errorpage": "%{script}getBody();\n\nfunction getBody() {\n    var Headers = Java.type('io.undertow.util.Headers');\n    var HtmlEncoder = Java.type('dk.itp.security.utils.HtmlEncoder');\n    \n    var errorInfo = JSON.parse(input);\n    \n    var reqHeaders = context.httpExchange.getRequestHeaders();\n    if (reqHeaders.getFirst('Content-Type') == 'application/json' ||\n        reqHeaders.getFirst('Accept').contains('application/json')) {\n        context.httpExchange.getResponseHeaders().add(Headers.CONTENT_TYPE, 'application/json')\n        \n        var resp = {\n            'status': errorInfo.status,\n            'error': errorInfo.message\n //           ,'diagnostics': errorInfo.exception\n        }\n        \n        return JSON.stringify(resp);\n    }\n    \n    context.httpExchange.getResponseHeaders().add(Headers.CONTENT_TYPE, 'text/html')\n    \n    return \"<html><head><title>Error \" + errorInfo.status + \"<\/title><\/head><body>Error \" +\n        errorInfo.status + \" \" + errorInfo.message +\n//        \"<pre>\" + HtmlEncoder.encode(errorInfo.exception) + \"<\/pre>\" +\n        \"<\/body><\/html>\"\n}"
  }
}

...

Here, you can specify the following settings:

Image RemovedImage Added

General

Contains general settings for the entire gateway
JSON object key is gateway 

...

Default is log
JSON key is accesslog.suffix 

Dynatrace

These settings affect the Dynatrace integration.

Note

This requires minimum Ceptor 6.5.0


Webserver name

Name of web server, presented to Dynatrace

Default is Ceptor
JSON key is dynatrace.webserver.name 

Application ID

Application ID, presented to Dynatrace

Default is Ceptor Gateway
JSON key is dynatrace.application.id 

Context root

Context root, presented to Dynatrace

Default is /
JSON key is dynatrace.context.root