Core Configuration
INX-Indexer uses a JSON standard format as a config file. If you are unsure about JSON syntax, you can find more information in the official JSON specs.
You can change the path of the config file by using the -c
or --config
argument while executing inx-indexer
executable.
For example:
inx-indexer -c config_defaults.json
You can always get the most up-to-date description of the config parameters by running:
inx-indexer -h --full
1. Application
Name | Description | Type | Default value |
---|---|---|---|
checkForUpdates | Whether to check for updates of the application or not | boolean | true |
shutdown | Configuration for shutdown | object |
Shutdown
Name | Description | Type | Default value |
---|---|---|---|
stopGracePeriod | The maximum time to wait for background processes to finish during shutdown before terminating the app | string | "5m" |
log | Configuration for log | object |
Log
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether to store self-shutdown events to a log file | boolean | true |
filePath | The file path to the self-shutdown log | string | "shutdown.log" |
Example:
{
"app": {
"checkForUpdates": true,
"shutdown": {
"stopGracePeriod": "5m",
"log": {
"enabled": true,
"filePath": "shutdown.log"
}
}
}
}
2. Logger
Name | Description | Type | Default value |
---|---|---|---|
level | The minimum enabled logging level | string | "info" |
disableCaller | Stops annotating logs with the calling function's file name and line number | boolean | true |
disableStacktrace | Disables automatic stacktrace capturing | boolean | false |
stacktraceLevel | The level stacktraces are captured and above | string | "panic" |
encoding | The logger's encoding (options: "json", "console") | string | "console" |
outputPaths | A list of URLs, file paths or stdout/stderr to write logging output to | array | stdout |
disableEvents | Prevents log messages from being raced as events | boolean | true |
Example:
{
"logger": {
"level": "info",
"disableCaller": true,
"disableStacktrace": false,
"stacktraceLevel": "panic",
"encoding": "console",
"outputPaths": ["stdout"],
"disableEvents": true
}
}
3. INX
Name | Description | Type | Default value |
---|---|---|---|
address | The INX address to which to connect to | string | "localhost:9029" |
maxConnectionAttempts | The amount of times the connection to INX will be attempted before it fails (1 attempt per second) | uint | 30 |
targetNetworkName | The network name on which the node should operate on (optional) | string | "" |
Example:
{
"inx": {
"address": "localhost:9029",
"maxConnectionAttempts": 30,
"targetNetworkName": ""
}
}
4. Indexer
Name | Description | Type | Default value |
---|---|---|---|
db | Configuration for Database | object |
Database
Name | Description | Type | Default value |
---|---|---|---|
engine | Database engine (sqlite, postgresql) | string | "sqlite" |
sqlite | Configuration for SQLite | object | |
postgresql | Configuration for PostgreSQL | object |
SQLite
Name | Description | Type | Default value |
---|---|---|---|
path | The path to the database folder | string | "database" |
PostgreSQL
Name | Description | Type | Default value |
---|---|---|---|
database | Database name | string | "indexer" |
username | Database username | string | "indexer" |
password | Database password | string | "" |
host | Database host | string | "localhost" |
port | Database port | uint | 5432 |
Example:
{
"indexer": {
"db": {
"engine": "sqlite",
"sqlite": {
"path": "database"
},
"postgresql": {
"database": "indexer",
"username": "indexer",
"password": "",
"host": "localhost",
"port": 5432
}
}
}
}
5. RestAPI
Name | Description | Type | Default value |
---|---|---|---|
bindAddress | The bind address on which the Indexer HTTP server listens | string | "localhost:9091" |
advertiseAddress | The address of the Indexer HTTP server which is advertised to the INX Server (optional) | string | "" |
maxPageSize | The maximum number of results that may be returned for each page | int | 1000 |
debugRequestLoggerEnabled | Whether the debug logging for requests should be enabled | boolean | false |
Example:
{
"restAPI": {
"bindAddress": "localhost:9091",
"advertiseAddress": "",
"maxPageSize": 1000,
"debugRequestLoggerEnabled": false
}
}
6. Profiling
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the profiling plugin is enabled | boolean | false |
bindAddress | The bind address on which the profiler listens on | string | "localhost:6060" |
Example:
{
"profiling": {
"enabled": false,
"bindAddress": "localhost:6060"
}
}
7. Prometheus
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the prometheus plugin is enabled | boolean | false |
bindAddress | The bind address on which the Prometheus HTTP server listens on | string | "localhost:9312" |
goMetrics | Whether to include go metrics | boolean | false |
processMetrics | Whether to include process metrics | boolean | false |
restAPIMetrics | Whether to include restAPI metrics | boolean | true |
inxMetrics | Whether to include INX metrics | boolean | true |
promhttpMetrics | Whether to include promhttp metrics | boolean | false |
Example:
{
"prometheus": {
"enabled": false,
"bindAddress": "localhost:9312",
"goMetrics": false,
"processMetrics": false,
"restAPIMetrics": true,
"inxMetrics": true,
"promhttpMetrics": false
}
}