We have updated our Terms of Service, Code of Conduct, and Addendum.

How do I change a worker's temp directory from "/tmp"?

John Padilla
John Padilla Posts: 2
edited September 2023 in Stream

Best Answer

  • Brian Yearwood
    Brian Yearwood Posts: 14 ✭✭
    Answer ✓

    As per the following resource https://docs.cribl.io/stream/environment-variables/#cribl_tmp_dir Cribl temporary files are stored in /tmp, these files are then removed by systemd-tmpfiles-clean.service. In order to have the files stored in an alternative location other than /tmp the following method can be used.

    1) Stop Cribl:
    cribl@:/opt/cribl/bin$ systemctl stop cribl

    2) Edit the Cribl service:
    cribl@:/opt/cribl/bin$ vi /etc/systemd/system/cribl.service

    3) Add the following entry to the cribl.service file:
    Environment=CRIBL_TMP_DIR=<directory name>

    4) Create the new directory and ensure the owner and group is cribl:
    cribl@:/opt/cribl/bin$ mkdir <directory name>
    cribl@:/opt/cribl/bin$ chown -R cribl:cribl <directory name>

    5) Reload systemd:
    cribl@:/opt/cribl/bin$ systemctl daemon-reload

    6) Start Cribl:
    cribl@:/opt/cribl/bin$ systemctl start cribl

    7) Check the update has taken effect:
    cribl@:/opt/cribl/bin$ ls -l <directory name>
    * the sub directory cribl_stream should be present under <directory name> *

Answers

  • Brian Yearwood
    Brian Yearwood Posts: 14 ✭✭
    Answer ✓

    As per the following resource https://docs.cribl.io/stream/environment-variables/#cribl_tmp_dir Cribl temporary files are stored in /tmp, these files are then removed by systemd-tmpfiles-clean.service. In order to have the files stored in an alternative location other than /tmp the following method can be used.

    1) Stop Cribl:
    cribl@:/opt/cribl/bin$ systemctl stop cribl

    2) Edit the Cribl service:
    cribl@:/opt/cribl/bin$ vi /etc/systemd/system/cribl.service

    3) Add the following entry to the cribl.service file:
    Environment=CRIBL_TMP_DIR=<directory name>

    4) Create the new directory and ensure the owner and group is cribl:
    cribl@:/opt/cribl/bin$ mkdir <directory name>
    cribl@:/opt/cribl/bin$ chown -R cribl:cribl <directory name>

    5) Reload systemd:
    cribl@:/opt/cribl/bin$ systemctl daemon-reload

    6) Start Cribl:
    cribl@:/opt/cribl/bin$ systemctl start cribl

    7) Check the update has taken effect:
    cribl@:/opt/cribl/bin$ ls -l <directory name>
    * the sub directory cribl_stream should be present under <directory name> *

  • John Padilla
    John Padilla Posts: 2

    Thanks @Brian Yearwood ! Awesome!

This discussion has been closed.