Skip to content

Instantly share code, notes, and snippets.

View tukanuk's full-sized avatar
😀

Ben Davidson tukanuk

😀
View GitHub Profile
import json
# Dynatrace provide a "magic" file called "dt_metadata_e617c525669e072eebe3d0f08212e8f2.json" that
# contains additional metadata. The file always has this name.
# Magic metadata file explainer: https://www.dynatrace.com/support/help/shortlink/enrich-metrics
# Usage in OT: https://www.dynatrace.com/support/help/shortlink/opent-python#send
service_props = {"service.name": "FlaskApp"}
try:
@tukanuk
tukanuk / oneagent_metric_API.ps1
Last active August 12, 2022 20:23
OneAgent Local API and Metric Scripting Integration Examples
$Params = @{
Method = "Post"
Uri = "http://localhost:14499/metrics/ingest"
Body = "test.temperature,sensor=basement 15"
ContentType = "text/plain; charset=utf-8"
}
Invoke-RestMethod @Params
# For more info see:
@tukanuk
tukanuk / creating_keys.md
Last active June 11, 2020 20:06
Using OpenSSL to create keys for Mac OS X.

Creating Keys

This is a brief guide to creating a public/private key pair that can be used for OpenSSL. While the "easy" version will work, I find it convenient to generate a single PEM bundle and then export the private/public key from that as needed. This document also covers how to add and remove a password from your private key and how to make sure that keychain will automatically unlock it when you sign in.

Just make it work

Generate an ssh key-pair: