Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

import requests
import os
# This is a library used to connect to a database (mysql, postgres, sqlite, etc)
from sqlalchemy import create_engine
def fetch_device():
# This should make a GET request to the URL with the path of /api/device
# requests library is something that needs to be installed. Usua
device = requests.get(f"http://localhost:3000/api/device")
@roger-king
roger-king / docker-compose.yml
Created June 11, 2019 19:40
docker-compose.yml - postgres example
version: "3"
volumes:
db: {}
services:
postgres:
image: postgres:11.2
container_name: mentor_db
environment:
Not Matching: Bean name: java.lang:type=Memory - Attribute name: ObjectPendingFinalizationCount - Attribute type: int
Matching: 4/350. Bean name: java.lang:type=Memory - Attribute name: HeapMemoryUsage - Attribute type: javax.management.openmbean.CompositeData
Matching: 8/350. Bean name: java.lang:type=Memory - Attribute name: NonHeapMemoryUsage - Attribute type: javax.management.openmbean.CompositeData
Not Matching: Bean name: java.lang:type=Memory - Attribute name: Verbose - Attribute type: boolean
Not Matching: Bean name: java.lang:type=MemoryPool,name=PS Eden Space - Attribute name: Usage - Attribute type: javax.management.openmbean.CompositeData
Not Matching: Bean name: java.lang:type=MemoryPool,name=PS Eden Space - Attribute name: PeakUsage - Attribute type: javax.management.openmbean.CompositeData
Not Matching: Bean name: java.lang:type=MemoryPool,name=PS Eden Space - Attribute name: UsageThreshold - Attribute type: long
Not Matching: Bean
init_config:
instances:
- host: ~private ip~
port: 7199
name: jmx_instance
user: username
password: password
#
# Visit http://docs.datadoghq.com/integrations/java/ to customize it