This is a log processor which enriches logs of the AnyLogic Cloud Executor with information about the AnyLogic model, such as the name and version.
This project is built using the OpenTelemetry Collector Builder (ocb). See Build your own collector.
To build run:
./ocb --config builder-config.yamlThis will create the otelcol-anylogic binary in the build/ directory.
- Edit/copy the
config.yamlfile. - Run the collector:
./build/otelcol-anylogic --config=config.yamlThis will tail logs from the ./testlogs/ directory.
- Copy the
config.yamltoconfig.production.yamland adjust it to your needs. - Build and push the container image:
podman build --tag ghcr.io/zenmo/otelcol-anylogic:latest .
podman push ghcr.io/zenmo/otelcol-anylogic:latest
- In
/home/alcadm/alc/controller/applications.json, change the configuration of the AnyLogic executor to mount a directory to write logs to:
{
"name": "executor",
"volumes": [
{
"host": "executor/log",
"container": "/var/log/executor"
}
]
}- Restart the executor.
docker stop executor \
&& docker rm executor \
&& docker restart controller- Run the otelcol container on the AnyLogic private cloud instance, mounting the same log directory:
docker pull ghcr.io/zenmo/otelcol-anylogic:latest
docker stop otelcol
docker rm otelcol
docker run \
--env ANYLOGIC_API_KEY=00000000-0000-0000-0000-000000000000 \
--detach \
--name otelcol \
--volume /home/alcadm/alc/cache/executor/log:/var/log/executor \
--restart unless-stopped \
ghcr.io/zenmo/otelcol-anylogic:latest