Configuration
Analytics configuration
You can find in the application.yaml in the /etc/apiomat/aom-analytics directory, which will look like this:
production:
# analytics:
# aomDashboardUrl:
"https://address.to.my.apiomat.dashboard"
#
#### configure a single mongo instance
# mongodb:
# host: localhost
# db: countly
# port:
27017
##### define username, password and dbOptions only when mongo auth is configured
# username: test
# password: test123
# dbOptions:
# authSource: admin
#### configure a mongo replica set
# mongodb:
# replSetServers:
# -
192.168
.
3.1
:
27017
# -
192.168
.
3.2
:
27017
# replicaName: test
##### define username, password and dbOptions only when mongo auth is configured
# username: test
# password: test123
# dbOptions:
# authSource: admin
#
#### configure consul
# consul:
# host:
127.0
.
0.1
# port:
8500
# secure:
false
# healthCheck:
# hostname: http:
//192.168.178.96
# port:
80
# timeout:
2
# interval:
5
# deregistercriticalserviceafter:
60
You can see a more detailed description for every parameter on this page in the docker environment variables section.
When coming from an earlier version (when updating), you have to adjust the old config.js files: simply overwrite both config.js with the config.aom.js files, which are placed in the same directory (/api and /frontend/express). After this overwriting, you can use the application.yaml to configure Analytics. For fresh 1.5 (or higher) installations, you don't need this step.
After modifying the configuration, you have to run the initialization script in /opt/aomanalytics/bin as root user:
sudo
bash
aom_init.sh
ApiOmat Configuration
After the installation, you can set the analytics host property in yambas.conf/apiomat.yaml to enable the ApiOmat-Analytics feature for your installation.
The following snippet shows the three lines to add to your config:
common:
analytics:
hosts:
internal: http:
//localhost:8001/ # internal host target of the installation
public
: http:
//www.yourdomain.yourhost.tld/ # external reachable address of the analytics instance
## add Analytics to the
default
Modules:
yambas:
## ...
defaultModules: Basics,Analytics
analyticsHostInternal=http:
//localhost:8001/ # internal host target of the installation
analyticsHostPublic=http:
//www.yourdomain.yourhost.tld/ # external reachable address of the analytics instance
## add Analytics to the
default
Modules:
defaultModules: Basics,Analytics
Activate Analytics
A restart of the Tomcat server will not initialize your analytics instance anymore (since 3.0.1).
You have to log in into the Dashboard via the SuperAdmin account, go to the configuration page and click the "Activate Analytics" button .
This will initialize the connection between Analytics and Yambas.
Configure Graylog
[Optional step]
When not using docker, the graylog integration needs further configuration. You first have to install the plugin for the nodejs server manager pm2 and then set the hostname and port via the following commands:
# install plugin
sudo
pm2
install
pm2-gelf
# configure address
sudo
pm2
set
pm2-gelf:graylogHostname 127.0.0.1
sudo
pm2
set
pm2-gelf:graylogPort 12201
After configuring analytics, you need to know how to manage the nodejs servers.