-adjust smb traffic amounts

-adjust nrpe config to match new smb traffic file sizes
This commit is contained in:
Pi
2019-03-26 10:05:29 -04:00
parent 2a5af0f7de
commit e83720a1c3
4 changed files with 13 additions and 6 deletions

View File

View File

@@ -2,9 +2,9 @@
# Do any local nrpe configuration here
######################################
command[check_test_file_100M]=/usr/bin/sudo /usr/lib/nagios/plugins/check_file_age -w 86400 -c 1570000 -W 50000000 -C 10 -f '/home/pi/Documents/smb/test_file_100M'
command[check_test_file_200M]=/usr/bin/sudo /usr/lib/nagios/plugins/check_file_age -w 86400 -c 1570000 -W 100000000 -C 10 -f '/home/pi/Documents/smb/test_file_200M'
command[check_test_file_200M]=/usr/bin/sudo /usr/lib/nagios/plugins/check_file_age -w 432600 -c 1570000 -W 100000000 -C 10 -f '/home/pi/Documents/smb/test_file_200M'
command[check_test_file_500M]=/usr/bin/sudo /usr/lib/nagios/plugins/check_file_age -w 432600 -c 1570000 -W 250000000 -C 10 -f '/home/pi/Documents/smb/test_file_500M'
command[check_test_file_1G]=/usr/bin/sudo /usr/lib/nagios/plugins/check_file_age -w 432600 -c 1570000 -W 500000000 -C 10 -f '/home/pi/Documents/smb/test_file_1G'
command[check_test_file_50M]=/usr/bin/sudo /usr/lib/nagios/plugins/check_file_age -w 86400 -c 1570000 -W 40000000 -C 10 -f '/home/pi/Documents/smb/test_file_50M'
command[check_root]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /
command[check_mem]=/usr/lib/nagios/plugins/check_mem.pl -u -C -w 85 -c 95
command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 30% -c 10%

View File

@@ -0,0 +1,7 @@
#!/bin/bash
head -c 50M < /dev/urandom > /media/share/test_file_50M
head -c 100M < /dev/urandom > /media/share/test_file_100M
head -c 200M < /dev/urandom > /media/share/test_file_200M
head -c 500M < /dev/urandom > /media/share/test_file_500M
chmod 777 /media/share/test_file*

View File

@@ -1,10 +1,10 @@
#! /bin/bash
file=$(i=$RANDOM
if [ $i -lt 16384 ]; then echo 'test_file_100M'
elif [ $i -lt 29490 ]; then echo 'test_file_200M'
elif [ $i -gt 31129 ]; then echo 'test_file_1G'
else echo 'test_file_500M';
if [ $i -lt 20000 ]; then echo 'test_file_50M'
elif [ $i -lt 29490 ]; then echo 'test_file_100M'
elif [ $i -gt 31129 ]; then echo 'test_file_500M'
else echo 'test_file_200M';
fi)
cd ~/Documents/smb