Skip to content

Instantly share code, notes, and snippets.

View Kami's full-sized avatar
:octocat:
🐕‍🦺 🦮 🇸🇮 🇺🇦 🇹🇼

Tomaz Muraus Kami

:octocat:
🐕‍🦺 🦮 🇸🇮 🇺🇦 🇹🇼
View GitHub Profile
@Kami
Kami / gist:2935271
Created June 15, 2012 07:49
raxmon create alarm example
raxmon-alarms-create --entity-id=<entity id> --notification-plan-id=<notification plan id> --check-id=<check id> --criteria="if (metric['code'] == '500') { \
return CRITICAL, 'Internal server error' \
} \
\
if (metric['body_match'] == '') { \
return WARNING, 'Copyright not found, returning WARNING.' \
} \
\
return OK"
@Kami
Kami / gist:2935253
Created June 15, 2012 07:43
raxmon create notification plan example
raxmon-notification-plans-create --label="plan #1" --critical-state=<email notification id>,<webhook notification id> --warning-state=<email notification id>,<webhook notification id>
@Kami
Kami / gist:2935248
Created June 15, 2012 07:42
raxmon create webhook notification example
raxmon-notifications-create --label="automation server" --type=webhook --details=url=http://example.com/myexample
@Kami
Kami / gist:2935247
Created June 15, 2012 07:42
raxmon create email and webhook notification example
raxmon-notifications-create --label="work email" --type=email --details=address=name@example.com
raxmon-notifications-create --label="automation server" --type=webhook --details=url=http://example.com/myexample
@Kami
Kami / gist:2935245
Created June 15, 2012 07:41
raxmon create entity example
raxmon-entities-create --label="webserver #1" --ip-addresses=eth0=203.0.113.1,eth1=203.0.113.2
@Kami
Kami / gist:2935234
Created June 15, 2012 07:38
raxmon create check example
raxmon-checks-create --entity-id=<entity id> --label="webserver check" --monitoring-zones=mzord,mzdfw,mzlon --target-alias=eth0 --type=remote.http --details=url=http://www.example.com/index.html,body=.*Copyright.*
@Kami
Kami / gist:2935232
Created June 15, 2012 07:37
.raxrc uk account example
[credentials]
username=<your username>
api_key=<your api key>
[auth_api]
url=https://lon.identity.api.rackspacecloud.com/v2.0
@Kami
Kami / gist:2935230
Created June 15, 2012 07:37
.raxrc us account example
[credentials]
username=<your username>
api_key=<your api key>
[
{
"host": "519.Hssi2-0-0.GW1.EWR1.ALTER.NET",
"ip": "157.130.0.17",
"rtts": [6.918, 8.213, null]
}
]
@Kami
Kami / gist:2859346
Created June 2, 2012 17:53
luvit traceroute exec
local Emitter = require('core').Emitter
local Error = require('core').Error
local table = require('table')
local childprocess = require('childprocess')
function split(str, pattern)
pattern = pattern or '[^%s]+'
if pattern:len() == 0 then pattern = '[^%s]+' end
local parts = {__index = table.insert}
setmetatable(parts, parts)