Skip to content

Instantly share code, notes, and snippets.

@tareqy
tareqy / NginxStats.ps1
Created August 30, 2018 17:20
PRTG NGINX Sensor
Param([string]$url)
$warningpreference = "silentlyContinue"
$global:resultText = "OK"
# create a table to store the information
$table = New-Object system.Data.DataTable "result"
$col1 = New-Object system.Data.DataColumn channel,string
$col2 = New-Object system.Data.DataColumn value,string
@tareqy
tareqy / PhpFpmStats.ps1
Created August 30, 2018 17:22
PRTG PHP-FPM Sensor
param(
[string]$url
);
$status_page = Invoke-WebRequest -uri $url -UseBasicParsing
$statistics = ,@("value","name")
# listen queue
@tareqy
tareqy / http_codes.txt
Created August 30, 2018 17:35
HTTP Response Codes
[Informational 1xx]
100=“Continue”
101=“Switching Protocols”
[Successful 2xx]
200=“OK”
201=“Created”
202=“Accepted”
203=“Non-Authoritative Information”
204=“No Content”
@tareqy
tareqy / gluster_bootstrap.sh
Created August 30, 2018 17:37
CentOS7 Gluster Node Bootstrap
yum -y groupinstall Base
yum -y install epel-release
yum -y install centos-release-gluster
yum -y install htop
yum -y install gcc
yum -y install net-snmp
yum -y install hdparm
yum -y update
yum -y remove abrt*
yum -y install glusterfs-server