Skip to content

Instantly share code, notes, and snippets.

View piotr1212's full-sized avatar

Piotr Popieluch piotr1212

  • The Netherlands
View GitHub Profile
@piotr1212
piotr1212 / check_chkconfig_status
Created August 6, 2013 11:05
nagios chkconfig check for red hat based os'es: checks which daemons should be running according to chkconfig, then checks status for each daemon
#!/bin/bash
# check_chkconfig_status
#
# Checks which services should be running according
# to chkconfig and check if they actually are.
#
# 2013-08-06: Piotr Popieluch
#
# for this to run from nrpe add the following line to /etc/sudoers:
@piotr1212
piotr1212 / collectd-gearman.spec
Last active December 21, 2015 20:39
rpm spec file for gearman-collectd plugin
Summary: Gearman plugin for collectd
Name: collectd-gearman
Version: 1
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Daemons
URL: https://github.com/powdahound/gearman-collectd-plugin
Source0: %{name}-%{version}.tar.gz
Source1: gearman.conf
@piotr1212
piotr1212 / collectd.spec
Created November 22, 2013 17:10
collectd.spec with dbi and memcachec plugins
Summary: Statistics collection daemon for filling RRD files
Name: collectd
Version: 4.10.9
Release: 2%{?dist}
License: GPLv2
Group: System Environment/Daemons
URL: http://collectd.org/
Source: http://collectd.org/files/%{name}-%{version}.tar.bz2
Source1: collectd-httpd.conf
@piotr1212
piotr1212 / gist:9135754
Created February 21, 2014 15:01
reposync script
#!/bin/bash
# based on: http://blog.kagesenshi.org/2007/06/fedora-repository-mirroring-script.html
# mirror root - the place you want the rpms to be downloaded
MROOT="/opt/storage/repository"
# processor architectures (space separated)
ARCHS="x86_64"
@piotr1212
piotr1212 / piwik.spec
Last active August 29, 2015 13:57
piwik spec file
Name: piwik
Version: 2.1.0
Release: 1%{?dist}
Summary: Free Web Analytics Software
Group: Applications/Internet
License: GPLv3+ and Public Domain and BSD and (MIT or GPLv2) and (MIT or GPL) and MIT and (BSD or GPLv2) and LGPL and GPL and LGPLv3+ and (MIT or GPLv3) and CC-BY and LGPLv2.1
URL: https://piwik.org/
Source0: https://builds.piwik.org/%{name}-%{version}.tar.gz
Source1: %{name}-nginx.conf
@piotr1212
piotr1212 / piwik-nginx.conf
Last active August 29, 2015 13:57
piwik-nginx.conf
## uncomment for https
#server {
# listen 80;
# server_name localhost;
#
# location / {
# return 301 https://$server_name;
# }
#}
#!/bin/bash
#
# log_check_es
#
# Check ElasticSearch for recent exceptions from the live tomcat servers
##Debug
#set -x
# Exit on Error
➜ rpmbuild fedora-review -b 1264546
INFO: Processing bugzilla bug: 1264546
INFO: Getting .spec and .srpm Urls from : 1264546
INFO: --> SRPM url: https://github.com/solettaproject/soletta-packaging/releases/download/v3/soletta-0.0.1-beta5.fc22.src.rpm
INFO: --> Spec url: https://raw.githubusercontent.com/solettaproject/soletta-packaging/v3/rpm/soletta.spec
INFO: Using review directory: /home/piotr/rpmbuild/1264546-soletta
INFO: Downloading .spec and .srpm files
warning: bogus date in %changelog: Tue Sep 2 2015 Gustavo Lima Chaves <[email protected]> - 0.0.1-beta5
warning: bogus date in %changelog: Tue Sep 2 2015 Gustavo Lima Chaves <[email protected]> - 0.0.1-beta5
INFO: No upstream for (Source2): config
@piotr1212
piotr1212 / singlestat.json
Created October 21, 2015 07:50
dashboard with 144 empty singlestats
{
"id": 3,
"title": "perf_test",
"originalTitle": "perf_test",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"sharedCrosshair": false,
@piotr1212
piotr1212 / grafana-backup.sh
Created November 16, 2015 10:10
Grafana sqlite backup script
cat /usr/share/grafana/grafana-backup.sh
#!/bin/bash
DB="/var/lib/grafana/grafana.db"
BACKUP="/data/backup/grafana/grafana.db-$(date +%Y%m%d).bck"
SQLITE=/usr/bin/sqlite3
ZIP=/bin/gzip
${SQLITE} ${DB} ".backup ${BACKUP}"
${ZIP} ${BACKUP}