- https://prometheus.io/
- https://prometheus.io/docs/introduction/overview/
- https://github.com/prometheus
| exporter | url |
module.exports = (robot) -> | |
robot.router.post "/#{robot.name}/capture/:feed", (req, res) -> | |
filepath = path.join process.env.FILE_BRAIN_PATH, "#{req.params.feed}" | |
payload = req.body | |
fs.appendFileSync filepath, "\n---------------------\n#{moment().utc().format()}\n\n" | |
fs.appendFileSync filepath, JSON.stringify(req.body, null, 2), 'utf-8' | |
res.setHeader 'content-type', 'text/plain' | |
res.status(200).end '' |
# on the kubesandbox VM | |
# sudo apt-get install apache2-utils | |
NEWHASH=$(echo -n `htpasswd -nb <user> <password>` | base64) | |
kubectl edit secret basic-auth --namespace=kube-system | |
# replace data.auth with $NEWHASH |
As I was testing around with https://bitnami.com/stack/kubernetes-sandbox I wanted to remotely access it
First find the token, by getting on the server, which is configured to trust any local user to be cluster admin with kubectl
TOKEN=$(kubectl get secrets -n kube-system | grep default-token | awk '{print $2}')
kubectl describe secret $TOKEN -n kube-system | grep token:
Now give that default user the cluster admin role
kubectl create clusterrolebinding admin-role --clusterrole=cluster-admin --serviceaccount=kube-system:default
Verifying my Blockstack ID is secured with the address 1NusJpR4yVaWZPVMqtXdp7p2Xy2magjbV5 https://explorer.blockstack.org/address/1NusJpR4yVaWZPVMqtXdp7p2Xy2magjbV5 |
<?php | |
foreach($data as $key => $row) { | |
$categories = array($row['Category']); | |
foreach($row as $h => $v) { | |
if (substr($h, 0, 3) == 'pr:') { | |
$cat = substr($h, 3); | |
if ($v != '') { | |
$categories[] = $cat; | |
} | |
unset($data[$key][$h]); |