Skip to content

Instantly share code, notes, and snippets.

// cells
regex = /\//
rows
.selectAll("td")
.data(d => Object.values(d))
.join("td")
// update the below logic to apply to your dataset
.attr("class", function(d) {
if (d.match(regex)) {
return 'date_f'
Databag:
{
'sensu_checks':
{
'ntp_check':
{
'sensu_check': 'ntp',
'command': "#{nagios_path}/check_ntp_time -H localhost -w 0.5 -c 1",
'handlers': ['almn_client'],
'subscribers': ['all'],
#Get dash box node for ip
dashbox="dash.#{node['medialets']['domain']}"
dash_node=search(:node, "name:#{dashbox}")
#Get mon box node for ip
monbox="mon03.#{node['medialets']['domain']}"
mon_node=search(:node, "name:#{monbox}")
#Get graphite box node for it
graphitebox="graphite.#{node['medialets']['domain']}"
graphite_node=search(:node, "name:#{graphitebox}")
```
require 'pp'
#pp node.debug_value(:cloud)
#pp node.debug_value(:m_monitoring)
```
```
#Prod
# Site1
P_FOG_VARS=" -f ./conf/fog_rc -o sysops_account -n Production_Site1_VPC --region eu-west-1 --key-name eu-sysops-deploy --key-file-pub ./keys/eu-west.pub --key-file-private ./keys/eu-west.pem --knife-file ./conf/knife-prod.rb "
#
# make the VPC
#
./makeVPC.rb $P_FOG_VARS -b 10.32.144.0/23 -d 10.32.144.0/24 -i 10.32.145.0/24 --nat-node-name nat01.site1.medialytics.com --dns-node-name dns01.intra2.medialets.com --flavor t2.small --centos 6hvm --security-group private --private-ip-address 10.32.145.199 --chef-env Production_Site1
#
# Cassandra boxes