Skip to content

Instantly share code, notes, and snippets.

View iDemonix's full-sized avatar
😎
Hacking away

iDemonix iDemonix

😎
Hacking away
View GitHub Profile
@iDemonix
iDemonix / check_instagram.sh
Last active December 5, 2018 16:55
check_instagram.sh
#!/bin/bash
# check_instagram.sh
# fetches simple stats about a given username for icinga2
# dan@danwalker.com - 2018-12
if [[ $# -eq 0 ]] ; then
echo 'Please specify a username, example: ./check_instagram.sh danwritescode'
exit 0
fi
Updating required Python packages (pip3 install -r requirements.txt --upgrade)...
Collecting Django<2.1,>=1.11 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/2b/85/337bfa37c4b82f59ee9b8deca55a8daa7ef16c8cdfa86d273625bc6ed887/Django-2.0.8-py3-none-any.whl (7.1MB)
100% |████████████████████████████████| 7.1MB 63kB/s
Collecting django-cors-headers==2.4.0 (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/cc/7e/83ba784ad2b95317bbbed915f0888d7d1cd8dc3d2e4b8ddec8fbc4c3e800/django_cors_headers-2.4.0-py2.py3-none-any.whl
Requirement already up-to-date: django-debug-toolbar==1.9.1 in /usr/lib/python3.4/site-packages (from -r requirements.txt (line 3))
Requirement already up-to-date: django-filter==1.1.0 in /usr/lib/python3.4/site-packages (from -r requirements.txt (line 4))
Collecting django-mptt==0.9.1 (from -r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/46/ec/415a72ff8c41be0e00900941fad48b3c696
@iDemonix
iDemonix / check_viprinet_channel.pl
Last active August 29, 2015 14:15
check_viprinet_channel.pl
#!/usr/bin/perl -w
# check_viprinet_channel.pl
#
# checks the operational status of a supplied channel ID (checks via the Viprinet hub, not direct to client)
# author Dan Walker
# email dan@danwalker.com
# created 2015-02-13
@iDemonix
iDemonix / check_ah_pdu_level.pl
Last active August 29, 2015 14:14
Nagios/Icinga check for Austin Hughes PPS-02-S basic check of total amps on a given PDU level
#!/usr/bin/perl -w
# check_ah_pdu_level.pl
#
# checks the total amps for a given bank on an Austin Hughes PPS-02-S
# author Dan Walker
# email dan@danwalker.com
# created 2015-01-30
@iDemonix
iDemonix / qpage.conf
Created January 8, 2015 10:08
Logstash Qpage Filter
filter {
if [type] == "qpage" {
grok {
match => { "message" => "%{TIMESTAMP_ISO8601:qpage_date}\|%{HOSTNAME:server}\|%{WORD:pager_service}\|%{WORD:alert_type}\|\[RT# %{INT:rt}\] - %{WORD:problem_state}\|%{USERNAME:alert_host}\|%{WORD:alert_state}\|%{DATA:alert_result}\|%{GREEDYDATA:alert_check}" }
}
date {
match => ["qpage_date", "YYYY-MM-dd HH:mm:ss"]
}
}
}