Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

securityonion-elsa-extras: cron.pl should check to see if it's already running #1059

Closed
dougburks opened this issue Jan 11, 2017 · 5 comments

Comments

@dougburks
Copy link
Contributor

Maybe add something like this to /opt/elsa/contrib/securityonion/contrib/securityonion-elsa-cron.sh:

# check to see if we're already running
for pid in $(pidof -x securityonion-elsa-cron.sh); do
    if [ $pid != $$ ]; then
        echo_error_msg 0 "Process is already running with PID $pid"
        exit 1
    fi
done
@dougburks
Copy link
Contributor Author

dougburks commented Aug 24, 2017

@dougburks
Copy link
Contributor Author

@dougburks
Copy link
Contributor Author

Removing this fix, as cron.pl already has a lock where necessary and there are times when we need to run multiple cron jobs:

If cron.pl runs for a long time, it is probably performing index consolidation, which can indeed take an hour. However, two cron.pl's should be able to run alongside each other. Can you confirm that when cron.pl runs for a long time, the indexer program is also running, and the name of the index it is indexing has "perm_" at the beginning? You can also check /data/elsa/log/node.log to see what is happening.

https://groups.google.com/d/topic/enterprise-log-search-and-archive/LREhCLDgaUg/discussion

@dougburks
Copy link
Contributor Author

@dougburks
Copy link
Contributor Author

closing this issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant