I hereby claim:
- I am gardart on github.
- I am gardart (https://keybase.io/gardart) on keybase.
- I have a public key ASCEaKt49AJeVMuAmMUN_-424hmrA0dC-3qtzaxIDR7LrQo
To claim this, I am signing this object:
input { | |
file { | |
# Example file generation : | |
# $ curl "http://brunnur.vedur.is/athuganir/athtafla/2016071410.html" 2>/dev/null | grep -i -e '</\?TABLE\|</\?TD\|</\?TR' | tr -d '\n' | se d 's | |
/Ig' | sed 's/<\/\?\(TABLE\|TR\)[^>]*>//Ig' | sed 's/^<T[DH][^>]*>\|<\/\?T[DH][^>]*>$//Ig' | sed 's/<\/T[DH][^>]*><T[DH][^>]*>/,/Ig' | sed 's/<[ | |
ed 's/^[\ \t]*//g' | sed '/^\s*$/d' | sed 's/^/2016071410,/' > /tmp/weather/data7.csv | |
# | |
#!/bin/bash | |
# Print out timestamp for each hour between date range | |
begin_date=`date +%Y-%m-%d" "%H":00:00" -d "01/01/2016"` | |
end_date=`date +%Y-%m-%d" "%H":00:00" -d "01/30/2016"` | |
while [ "$begin_date" != "$end_date" ] ; | |
do | |
begin_date=`date -d "${begin_date}"'1 hour' +%Y-%m-%d" "%H":00:00"` | |
converted_date=`date -d "${begin_date}" +%Y%m%d%H` | |
echo $converted_date | |
done |
#!/bin/bash | |
# Bash script to schedule downtime for Host | |
function die { | |
echo $1; | |
exit 1; | |
} | |
if [ $# -lt 1 ]; then |
Get Number of hosts down: | |
pynag livestatus --get hosts --columns "name state plugin_output" --filter "state = 1" | wc -l |
# Install Nagios NRPE client with okconfig/adagios support | |
sudo rpm -ihv http://opensource.is/repo/ok-release.rpm | |
sudo yum update -y ok-release | |
sudo yum install -y nrpe nagios-plugins-load nagios-plugins-procs nagios-plugins-swap | |
sudo yum --enablerepo=ok-testing install -y nagios-plugins-check_cpu nagios-okconfig-nrpe | |
sudo yum enable nrpe | |
# Fix allowed hosts and dont blame nrpe in nrpe settings | |
export NAGIOS_SERVER='192.168.1.100' | |
sed -i "/^allowed_hosts=/ s/$/,$NAGIOS_SERVER/" /etc/nagios/nrpe.cfg |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
PROGNAME=`/bin/basename $0` | |
PROGPATH=`echo $0 | /bin/sed -e 's,[\\/][^\\/][^\\/]*$,,'` | |
. $PROGPATH/utils.sh | |
#export PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins:/usr/lib/oracle/11.2/client64/bin | |
#export ORACLE_HOME=/usr/lib/oracle/11.2 | |
#export TNS_ADMIN=/etc | |
#export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib |
Step 1: Create build and capture machine for RHEL7 Step 2: Update machine, install packages Step 3: Create checkpoint Step 4: Sysprep Step 5: Copy vhdx file to your VMM library Step 6: Create template from your last BAC vhdx file Step 7: Revert to checkpoint created yearlier
To update RHEL7 template start at Step 3 and down to step 7.
# Export TOP X Performance statistics from VMM into a HTML table | |
$htmlfile = "c:\temp\status.html" | |
$firstx=10; # Select number of objects to list in the tables | |
# CSS style | |
$a = "<style>" | |
$a = $a + "BODY{background-color:peachpuff;}" | |
$a = $a + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}" | |
$a = $a + "TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:thistle}" | |
$a = $a + "TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:PaleGoldenrod}" |
yum update -y | |
yum install -y epel-release | |
yum clean all | |
# Add repos | |
rpm -Uvh "https://labs.consol.de/repo/stable/rhel7/i386/labs-consol-stable.rhel7.noarch.rpm" | |
rpm -ihv http://opensource.is/repo/ok-release.rpm | |
yum update -y ok-release | |
# |