Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to set max log size

95 views
Skip to first unread message

Cristina Ruscau

unread,
Dec 5, 2024, 3:48:00 PM12/5/24
to rundeck-discuss
Hello,

do you know what is the best way to set max log size in rundeck configured with docker?
do you know if setting  RUNDECK_LOGVIEWER_MAXLOGSIZE will do the trick?


rundeck.logviewer.maxLogSize=100MB


but not sure what is the best/easiest way to set it with rundeck docker.

In /etc/remco/templates/rundeck-config.properties I'm not sure how to do that.


Do you have any suggestions?

Thank you very much,

Cristina Ruscau

rac...@rundeck.com

unread,
Dec 5, 2024, 4:30:13 PM12/5/24
to rundeck-discuss
Hi Cristina,

You can add that property to the Image via REMCO following this step-by-step guide.

Regards!

Cristina Ruscau

unread,
Dec 11, 2024, 2:18:00 AM12/11/24
to rundeck-discuss
Hello,

Thank you, that guide was really helpful, I managed to add this setting, but it seems even though it's getting set correctly, for some reason it is not picked up by rundeck.
Any other suggestions on how to make that happen?
I'm using rundeck docker image version 5.7.0.

Thank you very much,
Cristina Ruscau

rac...@rundeck.com

unread,
Dec 11, 2024, 6:38:49 AM12/11/24
to rundeck-discuss
Hi Cristina,

Another way is to use an entrypoint script directly in the docker-compose file like this.

Regards!


Cristina Ruscau

unread,
Dec 11, 2024, 8:43:45 AM12/11/24
to rundeck-discuss

So do you think it doesn't get set properly? because I have set it via remco and I can see it set to my value in  /home/rundeck/server/config/rundeck-config.properties (which I assume it's the place of all rundeck configs.)

Because that seems like another way to achieve this.

Thank you,
Cristina

rac...@rundeck.com

unread,
Dec 11, 2024, 10:07:00 AM12/11/24
to rundeck-discuss
Hi Cristina,

Could you confirm that you're facing this issue? After some research, it seems the same. If so, try adding your use case to that thread.

Regards.

Cristina Ruscau

unread,
Dec 12, 2024, 4:21:17 AM12/12/24
to rundeck-discuss
Hello,

Yes, it seems to be the same issue, I will add the details to that case.
Do you know if it will be fixed soon?

Thank you very much,
Cristina

rac...@rundeck.com

unread,
Dec 12, 2024, 8:07:29 AM12/12/24
to rundeck-discuss

Hi Cristina,

I’ve tested and it works here on my end, let me share my REMCO config :)

The rundeck-config-extra.properties file (/remco/templates/ path):

# adding extra stuff to rundeck-config.properties file rundeck.execution.logs.output.limit={{ getv("/rundeck/execution/logs/output/limit", "2MB") }} rundeck.execution.logs.output.limitAction={{ getv("/rundeck/execution/logs/output/limitAction", "truncate") }} rundeck.logviewer.maxLogSize={{ getv("/rundeck/logviewer/maxLogSize", "2MB") }}

The rundeck-config.properties-extra.toml file (/remco/resources.d/ path):

[[template]] src = "${REMCO_TEMPLATE_DIR}/rundeck-config-extra.properties" dst = "${REMCO_TMP_DIR}/rundeck-config/rundeck-config-extra.properties" mode = "0644"

The docker-compose.yml file :

version: '3' services: rundeckserver: build: context: . dockerfile: Dockerfile args: url: http://localhost:4440 ports: - "4440:4440" restart: always

Dockerfile:

FROM rundeck/rundeck:5.8.0 COPY --chown=rundeck:root remco /etc/remco ARG url="" ENV RUNDECK_SERVER_ADDRESS=0.0.0.0 ENV RUNDECK_GRAILS_URL=$url

I’ve tested with the following job (it generates 10MB of log but the config only admits 2MB).

- defaultTab: nodes description: '' executionEnabled: true id: e5ef170a-beab-4a02-ab5d-70705b7f6f44 loglevel: INFO name: HelloWorld nodeFilterEditable: false plugins: ExecutionLifecycle: {} scheduleEnabled: true sequence: commands: - autoSecureInput: 'false' fileExtension: .sh interpreterArgsQuoted: false passSecureInput: 'false' script: |- base64 /dev/urandom | head -c 10000000 > file.txt sleep 1 cat file.txt sleep 1 rm file.txt scriptInterpreter: /bin/bash keepgoing: false strategy: node-first uuid: e5ef170a-beab-4a02-ab5d-70705b7f6f44

The parameters are in place after launching the container with the docker compose up command. Check the result here (if you change the job to generate less than 2MB, it shows the entire file content).

Try this config.

Hope it helps!

Cristina Ruscau

unread,
Dec 17, 2024, 11:45:15 AM12/17/24
to rundeck-discuss
Thank you very much, this worked!

Cristina Ruscau

rac...@rundeck.com

unread,
Dec 17, 2024, 4:25:27 PM12/17/24
to rundeck-discuss
Happy to help!
Reply all
Reply to author
Forward
0 new messages