Skip to content

Instantly share code, notes, and snippets.

View jhrcz's full-sized avatar

Jan Horacek jhrcz

View GitHub Profile
@jhrcz
jhrcz / gist:3833593
Created October 4, 2012 13:41
one-fix-vm-names.sh
!/bin/bash
set -x
DB="sqlite3 /var/lib/one/one.db"
function dbq
{
echo "$1" | $DB
}
@jhrcz
jhrcz / check_ospf_neighbor.sh
Created October 27, 2012 13:42
check_ospf_neighbor.sh
#!/bin/bash
# server ~ # /usr/local/bin/check_ospf_neighbor.sh list
#
# Neighbor ID Pri Dead Time Address
# 10.10.1.2 1 Full/DR 10.10.1.2 eth1:10.10.1.1 0
# 10.1.2.32 1 Full/DROther 10.1.5.12 tun0:10.1.5.11 0
# 1c6f473667b210805e1e430d2340879e
#
# server ~ # /usr/local/bin/check_ospf_neighbor.sh check 1c6f473667b210805e1e430d2340879e
@jhrcz
jhrcz / check-bindmounts-showcase.txt
Last active December 14, 2015 15:19
check_bindmounts showcase
ukazka check_bindmounts
vyuziva findmnt a diff mezi jeho pohledem na mtab a fstab,
pokud neni zaznam v obou tak je reportovano
### instalace
yum install --enablerepo=etn-devel nagios-plugin-check-bindmounts
@jhrcz
jhrcz / nrpe-checkrun-example.md
Last active December 16, 2015 22:30
nrpe-checkrun example

running check against remote host (useful for testing from central nagios server)

# nrpe-checkrun check_load server.domain.xxx
OK - load average: 3.40, 2.51, 2.51|load1=3.400;15.000;30.000;0; load5=2.510;10.000;25.000;0; load15=2.510;5.000;20.000;0; 

running on server for checking nrpe configuration

# nrpe-checkrun check_disk_all
DISK OK - free space: / 10911 MB (82% inode=92%); /dev/shm 1003 MB (100% inode=99%); /boot 18 MB (20% inode=99%);| /=2392MB;12614;13315;0;14016 /dev/shm=0MB;902;952;0;1003 /boot=73MB;86;91;0;96
to much depends over paradise....
mod_authnz_crowd od atlassianu
original package....
[root@etn-twinstone-1 ~]# yum install mod_authnz_crowd-2.0.1-1.el6.x86_64.rpm
Loaded plugins: changelog, downloadonly, etckeeper, priorities, security, versionlock
base | 3.7 kB 00:00

java testing

( /usr/bin/etnpol-sun-java-1.6.0-env-vars.sh ; echo java -version ) | bash -ls 2>&1 | grep 'java version "1.6.0_' && echo OK || echo FAIL
( /usr/bin/etnpol-sun-java-1.7.0-env-vars.sh ; echo java -version ) | bash -ls 2>&1 | grep 'java version "1.7.0_' && echo OK || echo FAIL

apache-tomcat-packages-testing-notes

rctc init-user tomcat55
rctc init-user tomcat60
rctc init-user tomcat70

rctc kill tomcat55
rctc kill tomcat60
# hotfix for this issue:
# X11 connection rejected because of wrong authentication
# debug2: X11 connection uses different authentication protocol.
#
# credits go to contributors in this bugzilla entry:
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=49944
#
n=$(xauth list | grep unix:"$(echo $DISPLAY | cut -d : -f 2 | cut -d . -f 1)" | sed -e 's,/unix:,:,')
echo "INFO: $n"
@jhrcz
jhrcz / nagios-timestamp-conver.sh
Created May 28, 2013 09:31
useful pipe tool for converting timestamps in nagios log to human readable format
perl -pe 's/(\d+)/localtime($1)/e'

struktura wiki namesapec a stranek

 *-- start
 |
 *-- sekceA
 |      *--subsekce1
 |      |`-subsekce2
 | `-subsejce3