Skip to content

Instantly share code, notes, and snippets.

View mreider's full-sized avatar

Matt Reider mreider

View GitHub Profile
@mreider
mreider / make-it-so.sh
Last active November 27, 2023 17:49
Argo Setup and OTel Demo Setup
#!/bin/bash
if [[ "$(uname)" != "Darwin" ]]; then
echo "This script is intended for macOS only."
exit 1
fi
# Check if Homebrew is installed
if ! command -v brew &> /dev/null; then
echo "Homebrew is not installed. Please install Homebrew first."
@mreider
mreider / app-only-gke.yaml
Last active August 31, 2023 06:58
app-only-gke.yaml
apiVersion: dynatrace.com/v1beta1
kind: DynaKube
metadata:
name: dynakube
namespace: dynatrace
annotations:
feature.dynatrace.com/automatic-kubernetes-api-monitoring: "true"
spec:
apiUrl: https://[your environment url/api
namespaceSelector:
@mreider
mreider / dynakube.yaml
Created August 9, 2023 09:20
Simple Dynakube with namespace selector
apiVersion: dynatrace.com/v1beta1
kind: DynaKube
metadata:
name: dynakube
namespace: dynatrace
spec:
apiUrl: (your Dynatrace environment URL)
namespaceSelector:
matchLabels:
monitoring: dynatrace

Global parameters

Parameter Description Default value
apiUrl {{versiontag 'Required'}} Dynatrace apiUrl including the /api path at the end.
- For SaaS, set YOUR_ENVIRONMENT_ID to your environment ID.
- For Managed, change the apiUrl address.
For instructions on how to determine the environment ID and how to configure the apiUrl address, see [Environment ID]({{link_to_id id='environment-id'}}).
tokens {{versiontag 'Optional'}} Name of the secret holding the API and PaaS tokens. Name of custom resource (.metadata.name) if unset
skipCertCheck {{versiontag 'Optional'}} Disable certificate check for the connection between Dynatrace Operator and the Dynatrace cluster.
Set to true if you want to skip any certification validation checks.
false
proxy {{versiontag 'Optional'}} Set custom proxy settings either directly or from a secret with the field proxy. *Note:
@mreider
mreider / bear.sh
Last active October 2, 2020 08:25
#!/bin/bash
HOMEPAGE='bear://x-callback-url/open-note?id=3B82C004-4B7D-4B66-A492-6D0F3EEDA40A-4300-00001FDE04293478'
BOOKMARKS='bear://x-callback-url/open-note?id=68496A87-42BE-479A-AE9C-3117CB1CB9FB-31243-00045FA30CF5DC43'
rawurlencode() {
local string="${1}"
local strlen=${#string}
local encoded=""
local pos c o
  1. Go to the Fargate Task Definition page and choose Create new Task Definition
  2. Choose Fargate and Next Step
  3. After naming the task, setting optional oles and sizes (optional) scroll to the Volumes section. We need to create a volume before creating container definitions in order to set the shared volume in each container.
  4. In the Volumes section choose Add volume
  5. Name the volume OneAgent with Volume type Bind Mount
  6. Scroll up to the Container Definition section
  7. Choose Add container and complete the Standard section as follows:

Container name: install-oneagent Image: alpine:3.8 (or later)

@mreider
mreider / index.html
Last active April 9, 2020 15:38
web ui deployment page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>webui</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- FONT
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link href='//fonts.googleapis.com/css?family=Raleway:400,300,600' rel='stylesheet' type='text/css'>
@mreider
mreider / version_forecaster.py
Created September 12, 2019 15:00
Forecasts versions of Dynatrace OneAgent
for i in numpy.arange(1.175, 1.20, 0.002):
printable_release = release_date.strftime("%b %d %Y")
print("# " + str(round(i,3)) + ' released on ' + printable_release)
release_date = release_date + datetime.timedelta(weeks=4)
# 1.175 released on Sep 05 2019
# 1.177 released on Oct 03 2019
# 1.179 released on Oct 31 2019
# 1.181 released on Nov 28 2019
# 1.183 released on Dec 26 2019
@mreider
mreider / releases.py
Last active September 11, 2019 08:19
import numpy
import datetime
release_date = datetime.datetime(2019, 9, 15, 5)
for i in numpy.arange(1.175, 1.100, -0.002):
printable_release = release_date.strftime("%b %d %Y")
print(str(round(i,3)) + ' released on ' + printable_release)
release_date = release_date - datetime.timedelta(weeks=2)
# 1.175 released on Sep 05 2019
# 1.173 released on Aug 08 2019
@mreider
mreider / mem-cpu.md
Created September 4, 2019 11:05
Reset memory and CPU in multipass

Stop multipass sudo launchctl unload /Library/LaunchDaemons/com.canonical.multipassd.plist

Edit the config sudo vim /var/root/Library/Application\ Support/multipassd/multipassd-vm-instances.json

you can edit “mem_size” there (it’s in bytes)

Start it again. sudo launchctl load /Library/LaunchDaemons/com.canonical.multipassd.plist