mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-10 03:02:58 +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
|
while read p; do
|
||||||
local NAME=$(echo $p | awk '{print $1}')
|
local NAME=$(echo $p | awk '{print $1}')
|
||||||
local EHOSTNAME=$(echo $p | awk -F"_" '{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"
|
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"]}}}}}'
|
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
|
done </tmp/nodes.txt
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
APP=stenoloss
|
APP=stenoloss
|
||||||
lf=/tmp/$APP-pidLockFile
|
lf=/tmp/$APP-pidLockFile
|
||||||
# create empty lock file if none exists
|
# create empty lock file if none exists
|
||||||
@@ -25,7 +24,22 @@ read lastPID < $lf
|
|||||||
[ ! -z "$lastPID" -a -d /proc/$lastPID ] && exit
|
[ ! -z "$lastPID" -a -d /proc/$lastPID ] && exit
|
||||||
echo $$ > $lf
|
echo $$ > $lf
|
||||||
|
|
||||||
|
TSFILE=/var/log/telegraf/laststenodrop.log
|
||||||
|
if [ -f "$TSFILE" ]; then
|
||||||
|
LASTTS=$(cat $TSFILE)
|
||||||
|
else
|
||||||
|
LASTTS=0
|
||||||
|
fi
|
||||||
|
|
||||||
# Get the data
|
# Get the data
|
||||||
DROP=$(tac /var/log/stenographer/stenographer.log | grep -m1 drop | awk '{print $14}' | awk -F "=" '{print $2}')
|
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"
|
echo "stenodrop drop=$DROP"
|
||||||
Reference in New Issue
Block a user