This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Make sure to allow a sufficient amount of ram to load all orders in memory | |
define('WP_MEMORY_LIMIT', '512M'); | |
// Load WordPress core & plugins | |
require_once('wp-load.php'); | |
// Get all completed orders | |
$query = new WC_Order_Query([ | |
'type' => 'shop_order', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"checks": { | |
"serverAlert": { | |
"command": "/etc/sensu/plugins/serverMetricsAlert.js", | |
"interval": 60, | |
"handlers": ["default"], | |
"subscribers": ["monit"] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# check if given host returns HTTP status 200 | |
# usage: httpd.sh [host:port] | |
# ex: httpd localhost:3000 | |
# if no arguments, default to localhost:80 | |
if [ -z "$1" ] | |
then | |
httpd=`curl -s -D - localhost -o /dev/null | sed -n '/HTTP/p'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"handlers": { | |
"influxdb": { | |
"type": "pipe", | |
"comman": "/etc/sensu/handlers/influx.js" | |
} | |
} | |
} |