Skip to content

Instantly share code, notes, and snippets.

View gary4est's full-sized avatar

Gary Forrest gary4est

  • Stc
  • Denver, Colorado
View GitHub Profile
@gary4est
gary4est / .screenrc
Created December 15, 2020 22:38
screenrc example
# GNU Screen - main configuration file
# All other .screenrc files will source this file to inherit settings.
# Author: Christian Wills - cwills.sys@gmail.com
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
@gary4est
gary4est / close_wavefront_event.sh
Last active April 18, 2019 22:09
Close a Wavefront event
#Close Wavefront event
curl -s -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "Authorization: Bearer ${wavefront_token}" "https://${WAVEFRONT_ORG}.wavefront.com/api/v2/event/${wavefront_event_id1}%3A${wavefront_evnet_id2}/close" -o /dev/null
exit
@gary4est
gary4est / create_wavefront_event.sh
Last active April 18, 2019 22:12
How to create a Wavefront event and capture the event ID
#create Wavefront Event
wavefront_event=$(curl -s -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "Authorization: Bearer ${wavefront_token}" -d "{
\"name\": \"broker_backup\",
\"annotations\": {
\"severity\": \"info\",
\"type\": \"backup\",
\"details\": \"broker backup\"
},
\"tags\": [
\"git\",
//Annotate Event to Grafana
def annotateEventToGrafana(event) {
withCredentials([[$class: 'StringBinding', credentialsId: 'grafana_token', variable: 'grafanaToken']]) {
grafanaToken = "${grafanaToken}"
if (event == 'deploy') {
listener_type = "Test"
} else {
listener_type = "Live"
}
{
"text": "Test grafana"
"Test",
"tags": [ "deployment", "env:dev", "application:test", "commit:123456789" ]
}
@gary4est
gary4est / healthcheck.json
Last active April 16, 2019 16:37
Health check response
{
"healthy": true,
"commit": "1e98e46",
"uptime": "05:22:47:21",
"connection_status": true
}
@gary4est
gary4est / puppet.conf
Created December 23, 2011 18:30
puppet.conf
Puppet Master /etc/puppet.conf
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
New /etc/puppet/auth.conf for the puppet master
### Authenticated ACL - those applies only when the client
### has a valid certificate and is thus authenticated
# allow nodes to retrieve their own catalog (ie their configuration)
path ~ ^/catalog/([^/]+)$
method find
allow $1
Error Message on Cloud Provisioner
err: Signing certificate ... Failed
err: Signing certificate error: Could not render to pson: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current key
err: exit
err: Try 'puppet help node_aws bootstrap' for usage
Current /etc/puppet/auth.conf on Puppet Master
# allow nodes to retrieve their own catalog (ie their configuration)