Skip to content

Instantly share code, notes, and snippets.

View StephenWeber's full-sized avatar

Stephen Weber StephenWeber

View GitHub Profile
@StephenWeber
StephenWeber / Dockerfile
Created October 1, 2020 19:28
Example production image for Nike-Inc/referee
FROM node:10
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
RUN mkdir -p /app
RUN curl -L https://github.com/Nike-Inc/referee/archive/master.zip -o referee.zip && unzip -o referee.zip -d /app && rm -f referee.zip
@StephenWeber
StephenWeber / setup_tests.sh
Last active July 17, 2020 21:47
Example test file demonstrating stackstorm-vault ca_cert logic, expected to be placed in ${PROJECT_BASE}/actions/lib/ next to actions.py
#!/bin/bash
# to run this test, copy the test_action.py file to ${PROJECT_ROOT}/actions/lib/test_action.py and then:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install 'git+https://github.com/StackStorm/st2.git@v3.2.0#egg=st2common&subdirectory=st2common'
pip install pytest
@StephenWeber
StephenWeber / 2018-06-08T00:46:28Z.txt
Last active June 8, 2018 01:00
Investigating the Alarmist timeouts / false positives
time="2018-06-08T00:46:28Z"
level=debug
msg="alerter-main: Alert details"
AlerterMessageOptions=map[
DisplayMessage:
http: Check failed with exit 2 for prod-clm-10-vip-status-check-auto-generated-prod-lag-10.nr-ops.net (host: prod-lag-10.nr-ops.net)! Error: HTTP request failed: Get http://prod-lag-10.nr-ops.net:80/status/check: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)! Details:
StatusCode:0 AttemptCount:82423 ExitCode:2 AlertKey:edge-clm-10
Service:prod-clm-10-vip-status-check-auto-generated-prod-lag-10.nr-ops.net StatusMessage:
HTTP request failed:
Get http://prod-lag-10.nr-ops.net:80/status/check:
@StephenWeber
StephenWeber / sensu-event.json
Created April 15, 2014 15:01
Minimal JSON data that can be sent to sensu-client which will engage the TTL handler. That will automatically resolve the event after the specified number of seconds.
{
"name": "webserver_log_error",
"output": "Could not instantiate appender named FILE.",
"status": 2,
"ttl": 60
}