Skip to content

Instantly share code, notes, and snippets.

# The purpose of this script is to help push monitoring information gathered using other scripts to all zabbix servers
# example of usage script
# ******
# send="/etc/zabbix/zabbix_sender.sh"
# value=$(/script/to/fetch/value.py)
# if [ -z "$value" ];then value=Null;fi
# $send {zabbix.key} $value 2>&1 >/dev/null
# *******
#!/bin/bash
@julcap
julcap / log_fragmenter.py
Last active May 4, 2016 13:04
Log fragmenting tool
# Log fragmenting 'tool'
# Author: Julian Capilla-krumbak
# Date: 2016-05-04
#
# Expected log format: yyyymmdd_xxxxxxxxxxxx
# It will put logs in folders per day like ./20160101/ ./20160102/ .. etc
import os,shutil
class FolderDist(object):
@julcap
julcap / check-cacerts.sh
Last active June 10, 2020 20:45
Check expiration date for certificates in JVM cacerts file
######################################################
# List certificates, find if a cert is expired.
# Requirements for sending emails: postfix, mailutils
#
# 15-12-2015
# Julian Capilla
# lyhan_jr@hotmail.com
######################################################
#!/bin/bash
@julcap
julcap / kill_long_queries.sh
Last active June 4, 2017 09:41
Kill long MySQL queries
##################################################
# Kill long queries #
# This shell script will kill queries that have #
# passed the $MAX execution time. #
# Julian Capilla-krumbak #
# lyhan_jr@hotmail.com #
# 21-05-2014 #
##################################################
#!/bin/bash