mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion into dev
This commit is contained in:
@@ -240,7 +240,7 @@ rc1_to_rc2() {
|
||||
while read p; do
|
||||
local NAME=$(echo $p | awk '{print $1}')
|
||||
local EHOSTNAME=$(echo $p | awk -F"_" '{print $1}')
|
||||
local IP=$(echo $p | awk '{print $2}')
|
||||
local IP=$(echo $p | awk '{print $2}')
|
||||
echo "Adding the new cross cluster config for $NAME"
|
||||
curl -XPUT http://localhost:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"'$NAME'": {"skip_unavailable": "true", "seeds": ["'$EHOSTNAME':9300"]}}}}}'
|
||||
done </tmp/nodes.txt
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
APP=stenoloss
|
||||
lf=/tmp/$APP-pidLockFile
|
||||
# create empty lock file if none exists
|
||||
@@ -25,7 +24,22 @@ read lastPID < $lf
|
||||
[ ! -z "$lastPID" -a -d /proc/$lastPID ] && exit
|
||||
echo $$ > $lf
|
||||
|
||||
# Get the data
|
||||
DROP=$(tac /var/log/stenographer/stenographer.log | grep -m1 drop | awk '{print $14}' | awk -F "=" '{print $2}')
|
||||
TSFILE=/var/log/telegraf/laststenodrop.log
|
||||
if [ -f "$TSFILE" ]; then
|
||||
LASTTS=$(cat $TSFILE)
|
||||
else
|
||||
LASTTS=0
|
||||
fi
|
||||
|
||||
echo "stenodrop drop=$DROP"
|
||||
# Get the data
|
||||
LOGLINE=$(tac /var/log/stenographer/stenographer.log | grep -m1 drop)
|
||||
CURRENTTS=$(echo $LOGLINE | awk '{print $1}')
|
||||
|
||||
if [[ "$CURRENTTS" != "$LASTTS" ]]; then
|
||||
DROP=$(echo $LOGLINE | awk '{print $14}' | awk -F "=" '{print $2}')
|
||||
echo $CURRENTTS > $TSFILE
|
||||
else
|
||||
DROP=0
|
||||
fi
|
||||
|
||||
echo "stenodrop drop=$DROP"
|
||||
Reference in New Issue
Block a user