Execute custom curator jobs #4492
Replies: 3 comments 13 replies
-
Great work! I'll go ahead and try it myself. After that, would you mind if I typed it up prettily and submitted a pull request to the docs to get this added? It'd help a lot of people, myself included. If you planned on doing that, perfectly fine, just thought I'd help if I can! |
Beta Was this translation helpful? Give feedback.
-
Just small notes from my side:
Hope this helps to others. :) |
Beta Was this translation helpful? Give feedback.
-
@gebhard73 - Would you be able to provide any help for someone trying to follow your instruction additions for SO-Curator section, and having issues when I copy the warm action file template over into a new file. It says I have an extra argument. This is my first one, and I do not have a self created working action file to base anything off of. It would be much appreciated if you could. |
Beta Was this translation helpful? Give feedback.
-
This is a short description how to run custom curator jobs. I haven't been able to figure out an "official" way but this seems to work fine as of now. Please comment if there are better ways to do this.
The SO documentation can be found here: https://docs.securityonion.net/en/2.3/curator.html (but is somewhat "brief" ... ;-) )
Update 2021-06-27: The documentation has been enhanced based on the information below, thanks @TheN00bBuilder .
Create an action file in
/opt/so/saltstack/local/salt/curator/files/action/
:This action file defines the parameters of the delete job. For examples see
/opt/so/saltstack/default/salt/curator/files/action/
. The file should be owned bycurator:socore
.Create a script file in
/opt/so/saltstack/local/salt/curator/files/bin/
:This script file will execute curator with the action file. For excamples see
/opt/so/saltstack/default/salt/curator/files/bin/
.Create saltstack file:
The default curator saltstack file must be altered. Copy
/opt/so/saltstack/default/salt/curator/init.sls
to/opt/so/saltstack/local/salt/curator
and add the following parts:Restart curator:
sudo so-curator-restart
Check cronjobs:
sudo crontab -l
The new job should be listed. Check the bin file's location, too.
Note: please make sure that you copy modifications / additions introduced by SO updates for
/opt/so/saltstack/default/salt/curator/init.sls
into your customized/opt/so/saltstack/local/salt/curator/init.sls
. See also #4441.Beta Was this translation helpful? Give feedback.
All reactions