sematext/sematext-agent-docker

Cannot initialize linux agent:SyntaxError: missing ) after argument list

dkvdm opened this issue · 2 comments

dkvdm commented

I'm using sematext/sematext-agent-docker:latest and my logs I'm getting


7/21/2017 11:09:18 AMDocker Hostname: REMOVED
7/21/2017 11:09:19 AMdocker_id=REMOVED:REMOVED:REMOVED
7/21/2017 11:09:19 AMdocker_hostname=REMOVED
7/21/2017 11:09:19 AMNODE_VERSION=8.1.4 MAXMIND_DB_DIR=/usr/src/app/ SPM_LOG_TO_CONSOLE=true YARN_VERSION=0.24.6 HOSTNAME=REMOVED SHLVL=1 HOME=/root SPM_REPORTED_HOSTNAME=REMOVED LOGSENE_ENABLED_DEFAULT=true LOGSENE_TMP_DIR=/logsene-log-buffer TERM=xterm SPM_LOG_LEVEL=error SPM_TOKEN=REMOVED CONFIG_FILE=/run/secrets/sematext-agent PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NPM_CONFIG_LOGLEVEL=info SPM_RECEIVER_URL=https://spm-receiver.sematext.com:443/receiver/v1/_bulk ENABLE_AUTODETECT_SEVERITY=true MAX_CLIENT_SOCKETS=1 GEOIP_ENABLED=false SPM_TRANSMIT_INTERVAL_IN_MS=10000 ENABLE_LOGSENE_STATS=false DOCKER_HOST=unix:///var/run/docker.sock SPM_COLLECTION_INTERVAL_IN_MS=10000 PWD=/usr/src/app DOCKER_PORT=2375 LOGSENE_TOKEN=
7/21/2017 11:09:19 AMhttps://spm-receiver.sematext.com:443/receiver/v1/receiver/custom/receive.json?token=REMOVED
7/21/2017 11:09:20 AM2017-07-21T18:09:20.002Z - error: Cannot initialize linux agent:SyntaxError: missing ) after argument list
7/21/2017 11:09:20 AM2017-07-21T18:09:20.005Z - INFO - No logs will be collected: missing -e LOGSENE_TOKEN=YOUR_LOGSENE_TOKEN

What gives?

otisg commented

Look at this line:
7/21/2017 11:09:19 AMNODE_VERSION=8.1.4 ..... LOGSENE_TOKEN=

See how there is no value for LOGSENE_TOKEN?
Try adding your Logsene App token there.

@flxfxp There was a problem in linuxAgent sub-module, which went into the latest build. We fixed it and started a new image build for v1.31.30 on docker hub.

Please remove sematext-agent container, pull the new sematext/sematext-agent-docker image , and run it again.

Note: When you specify the SPM_TOKEN, you don't need LOGSENE_TOKEN - at least one of both tokens must be specified. When you add LOGSENE_TOKEN, the agent will collect all container logs in addition to the metrics.