Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am silfreed on github.
* I am silfreed (https://keybase.io/silfreed) on keybase.
* I have a public key ASCc4m6d_IVMQewdAsjhe-48PKutepg2PS5qQNs1IOx22Qo
To claim this, I am signing this object:
# /etc/systemd/system/php-fpm@.service
[Unit]
Description=Runs multiple php-fpm processes
After=syslog.target network.target
[Service]
PrivateTmp=true
Type=simple
ExecStart=/usr/sbin/php-fpm -F -y /etc/php-fpm/%i.conf
# Description:
# This script receives pages in the formats
# /usr/bin/curl -d host="$HOSTALIAS$" -d output="$SERVICEOUTPUT$" -d description="$SERVICEDESC$" -d type=service -d notificationtype="$NOTIFICATIONTYPE$ -d state="$SERVICESTATE$" $CONTACTADDRESS1$
# /usr/bin/curl -d host="$HOSTNAME$" -d output="$HOSTOUTPUT$" -d type=host -d notificationtype="$NOTIFICATIONTYPE$" -d state="$HOSTSTATE$" $CONTACTADDRESS1$
#
# Based on a gist by oremj (https://gist.github.com/oremj/3702073)
#
# Configuration:
# HUBOT_NAGIOS_URL - https://<user>:<password>@nagios.example.com/cgi-bin/nagios3
#
cactiStyle(
asPercent(
derivative(
groupByNode(
aliasByNode(collectdwash*.cpu-*.cpu-*, 2)
, 2, "sumSeries")
)
, derivative(
sumSeries(collectdwash*.cpu-*.cpu-*)
)
cactiStyle(
aliasByNode(
asPercent(
derivative(
groupByNode(collectdwash*.cpu-*.cpu-*, 2, "sumSeries")
)
, derivative(
sumSeries(collectdwash*.cpu-*.cpu-*)
)
)
[silfreed@thor ~]$ grep -A3 md5 /proc/mdstat
md5 : active raid5 sdh[7] sde[5] sdc[4]
5860270976 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
bitmap: 2/22 pages [8KB], 65536KB chunk
[silfreed@thor ~]$ sudo hdparm -tT /dev/md5
/dev/md5:
Timing cached reads: 8250 MB in 2.00 seconds = 4129.46 MB/sec
Timing buffered disk reads: 838 MB in 3.00 seconds = 279.32 MB/sec
# Description:
# svelame will make you feel all warm .. in your head
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# curlplugin-zoom-cablemodem-types.db
#
# DownstreamChannelPowerdBmVBase value:GAUGE:U:U
# DownstreamFrequencyBase value:GAUGE:U:U
# DownstreamQamBase value:GAUGE:U:U
# DownstreamSnrBase value:GAUGE:U:U
# UpstreamBwBase value:GAUGE:U:U
# UpstreamChannelIdBase value:GAUGE:U:U
# UpstreamChannelPowerBase value:GAUGE:U:U
# UpstreamFrequencyBase value:GAUGE:U:U
@silfreed
silfreed / nagios.coffee
Last active January 1, 2016 11:09 — forked from benwtr/nagios.coffee
# Description:
# This script receives pages in the formats
# /usr/bin/curl -d host="$HOSTALIAS$" -d output="$SERVICEOUTPUT$" -d description="$SERVICEDESC$" -d type=service -d notificationtype="$NOTIFICATIONTYPE$ -d state="$SERVICESTATE$" $CONTACTADDRESS1$
# /usr/bin/curl -d host="$HOSTNAME$" -d output="$HOSTOUTPUT$" -d type=host -d notificationtype="$NOTIFICATIONTYPE$" -d state="$HOSTSTATE$" $CONTACTADDRESS1$
#
# Based on a gist by oremj (https://gist.github.com/oremj/3702073)
#
# Configuration:
# HUBOT_NAGIOS_URL - https://<user>:<password>@nagios.example.com/cgi-bin/nagios3
#