Dashing widget to show the build status of a CircleCI project.
- Get a Circle API Token from your Account Dashboard and set it in your environment as
CIRCLE_CI_AUTH_TOKEN
- Add the
httparty
to your Gemfile and runbundle install
Then:
Dashing widget to show the build status of a CircleCI project.
CIRCLE_CI_AUTH_TOKEN
httparty
to your Gemfile and run bundle install
Then:
# Postfix stuff based on https://gist.github.com/jbrownsc/4694374: | |
QUEUEID (?:[A-F0-9]+|NOQUEUE) | |
EMAILADDRESSPART [a-zA-Z0-9_.+-=:]+ | |
EMAILADDRESS %{EMAILADDRESSPART:local}@%{EMAILADDRESSPART:remote} | |
RELAY (?:%{HOSTNAME:relayhost}(?:\[%{IP:relayip}\](?::[0-9]+(.[0-9]+)?)?)?) | |
POSREAL [0-9]+(.[0-9]+)? | |
DELAYS (%{POSREAL}[/]*)+ | |
DSN %{NONNEGINT}.%{NONNEGINT}.%{NONNEGINT} | |
STATUS sent|deferred|bounced|expired |
FORTIDATE %{YEAR:year}\-%{MONTHNUM:month}\-%{MONTHDAY:day} | |
FORTIGATE_LITEBASE <%{NUMBER:syslog_index}>date=%{FORTIDATE:date} time=%{TIME:time} devname=%{HOST:hostname} devid=%{HOST:devid} logid=%{NUMBER:logid} type=%{WORD:type} subtype=%{WORD:subtype} eventtype=%{WORD:eventtype} level=%{WORD:level} vd=\"%{WORD:vdom}\" | |
FORTIGATE_LITEBASE2 <%{NUMBER:syslog_index}>date=%{FORTIDATE:date} time=%{TIME:time} devname=%{HOST:hostname} devid=%{HOST:devid} logid=%{NUMBER:logid} type=%{WORD:type} subtype=%{WORD:subtype} level=%{WORD:level} vd=\"%{WORD:vdom}\" | |
# 185 - IPS | |
FORTIGATE_185 severity=%{WORD:severity} srcip=%{IP:srcip} dstip=%{IP:dstip} srcintf=\"%{HOST:srcintf}\" policyid=%{DATA:policyid} identidx=%{DATA:identidx} sessionid=%{NUMBER:sessionid} status=%{DATA:status} proto=%{NUMBER:proto} service=%{DATA:service} count=%{NUMBER:count} attackname=\"%{DATA:attackname}\" srcport=%{NUMBER:srcport} dstport=%{NUMBER:dstport} attackid=%{NUMBER:attackid} sensor=\"%{DATA:sensor}\" ref=\"%{DATA:ref}\";? msg=\"%{GREEDYDAT |
FORTIDATE %{YEAR:year}\-%{MONTHNUM:month}\-%{MONTHDAY:day} | |
FORTIGATE_52BASE <%{NUMBER:syslog_index}>date=%{FORTIDATE:date} time=%{TIME:time} devname=%{HOST:hostname} devid=%{HOST:devid} logid=%{NUMBER:logid} type=%{WORD:type} subtype=%{WORD:subtype} eventtype=%{WORD:eventtype} level=%{WORD:level} vd=\"%{WORD:vdom}\" | |
FORTIGATE_52BASEV2 <%{NUMBER:syslog_index}>date=%{FORTIDATE:date} time=%{TIME:time} devname=%{HOST:hostname} devid=%{HOST:devid} logid=%{NUMBER:logid} type=%{WORD:type} subtype=%{WORD:subtype} level=%{WORD:level} vd=\"%{WORD:vdom}\" | |
FORTIGATE_52IPS severity=%{WORD:severity} srcip=%{IP:srcip} dstip=%{IP:dstip} sessionid=%{NUMBER:sessionid} action=%{DATA:action} proto=%{NUMBER:proto} service=%{DATA:service} attack=\"%{DATA:attack}\" srcport=%{NUMBER:srcport} dstport=%{NUMBER:dstport} attackid=%{NUMBER:attackid} profile=\"%{DATA:profile}\" ref=\"%{DATA:ref}\";? incidentserialno=%{NUMBER:incidentserialno} msg=\"%{GREEDYDATA:msg}\" | |
FORTIGATE_52DOS severity=%{WORD:severity} srcip=%{IP:srcip} dstip=%{IP: |
#!/usr/bin/python | |
## | |
## Company directory information with SecurePass | |
## Outputs Mediawiki compatible | |
## | |
## (c) 2014 Giuseppe Paterno' ([email protected]) | |
## GARL Sagl (www.garl.ch) | |
## | |
import os, sys |
Sample PHP code to accept PagerDuty webhooks and send out notifications by email on state changes. | |
For more information, see http://developer.pagerduty.com/documentation/rest/webhooks | |
This example threads emails based on "$status: $description on $service" so each update to each incident would start a new thread. | |
This code is unsupported by PagerDuty. | |
<?php | |
$emailAddress = "[email protected]"; | |
#!/bin/bash | |
apt-get install -y curl unzip | |
mkdir -p /var/lib/consul | |
mkdir -p /usr/share/consul | |
mkdir -p /etc/consul/conf.d | |
curl -OL https://dl.bintray.com/mitchellh/consul/0.3.1_linux_amd64.zip | |
unzip 0.3.1_linux_amd64.zip | |
mv consul /usr/local/bin/consul |
#!/bin/bash | |
export PUBLIC_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address) | |
export CONSUL_KEY=$(consul keygen) | |
service consul stop | |
rm -rf /var/cache/octohost/* | |
sudo cat > /etc/consul.d/default.json << EOL | |
{ | |
"data_dir": "/var/cache/octohost", | |
"server": true, |
Setting of Uchiwa dealing with multiple sensu-server | |
In json of Uchiwa, by the sensu in array as follows, it seems it's enough to describe the end point of all of sensu-api. | |
uchiwa.json | |
{ | |
"Uchiwa": { | |
(Omitted) | |
}, | |
"Sensu": [ |
input { | |
udp { | |
host => "0.0.0.0" | |
port => 2055 | |
codec => netflow { cache_ttl => 1 | |
versions => [ 5, 9 ] | |
} | |
type => "netflow" | |
} | |
} |