This is a simple server that scrapes toggl track stats and exports them via HTTP for Prometheus consumption.
The toggl_exporter
listens on HTTP port 9981 by default. See the --help
output for more options.
Note: You must pass toggl api key via --toggl.api-key
command flag or TOGGL_API_KEY
environemnt variables.
apiVersion: apps/v1
kind: Deployment
metadata:
name: toggl-exporter
labels:
app: toggl-exporter
spec:
replicas: 1
selector:
matchLabels:
app: toggl-exporter
template:
metadata:
labels:
app: toggl-exporter
spec:
containers:
- name: toggl-exporter
image: ghcr.io/44smkn/toggl_exporter:latest
ports:
- containerPort: 9981
env:
- name: TOGGL_API_KEY
valueFrom:
secretKeyRef:
name: toggl-secret
key: api-key
---
apiVersion: v1
kind: Secret
metadata:
name: toggl-secret
type: Opaque
data:
api-key: YWRtaW4=
This is Extremely rare use cases.
See: https://github.com/44smkn/toggl_exporter_serverless
Name | Description |
---|---|
ProjectDuration | sum of time entry grouped by the project |