Continuously sends a gauge metric using the datadogpy library.
| Env Var | Default | Description |
|---|---|---|
DD_AGENT_HOST | 127.0.0.1 | IP address to send metrics to |
DD_DOGSTATSD_PORT | 8125 | Port to send metrics to |
DSD_METRIC_VALUE | 2 | Value of custom metric |
DSD_METRIC_NAME | dsd.python | Name of custom metric |
DSD_SLEEP_TIME | 10 | Time (in seconds) to wait between sending metrics |
DD_DOGSTATSD_SOCKET * | null | Path to socket to be used for UDS (e.g. /var/run/datadog/dsd.socket) |
* When set, this will override any UDP-specific settings. Be sure to also mount the directory containing the DSD socket in the app manifest.
| Env Var | Default | Description |
|---|---|---|
DATADOG_TAGS | null | Comma-separated string of tags to send with the metric (e.g. tag1:value1,tag2:value2) |
DD_ENTITY_ID | null | Only available in k8s. Set to the pod UID using the downward API (see example manifest below) |
DD_ENV | null | String |
DD_SERVICE | null | String |
DD_VERSION | null | String |
** Metrics will always be tagged with dsd:python and datadogpy_version:<datadogpy_version>
Image tags correspond to the datadogpy version the image was built with.
Note: latest is 0.39.0 and uses an older version of the app for no particular reason. As of {insert time here}, 0.42.0 hasn't been thoroughly tested, but it at least sends UDP metrics in a vanilla deployment ¯\(ツ)/¯.
Example deployment manifest:
apiVersion: apps/v1
kind: Deployment
metadata:
name: dsd-python
labels:
app: dsd-python
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: dsd-python
template:
metadata:
labels:
app: dsd-python
spec:
containers:
- name: dsd-python
imagePullPolicy: Always
image: jikkendd/dd-dsd-python:latest
# resources:
# requests:
# memory: "128Mi"
# cpu: "128m"
# limits:
# memory: "128Mi"
# cpu: "128m"
env:
# - name: DD_ENTITY_ID
# valueFrom:
# fieldRef:
# fieldPath: metadata.uid
# - name: DD_AGENT_HOST
# valueFrom:
# fieldRef:
# apiVersion: v1
# fieldPath: status.hostIP
# - name: DATADOG_TAGS
# value: "tag_1:test,tag_2:test,tag_3:test"
- name: DSD_METRIC_NAME
value: "test_metric"
- name: DD_DOGSTATSD_SOCKET
value: "/var/run/datadog/dsd.socket"
volumeMounts:
- name: dsdsocket
mountPath: /var/run/datadog
readOnly: true
volumes:
- hostPath:
path: /var/run/datadog/
name: dsdsocket
Content type
Image
Digest
Size
60.7 MB
Last updated
almost 6 years ago
docker pull jikkendd/dd-dsd-python