toggl_exporter

module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2021 License: Apache-2.0

README

toggl_exporter

License

This is a simple server that scrapes toggl track stats and exports them via HTTP for Prometheus consumption.

Installation and Usage

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.

Kubernetes
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=
AWS SAM

This is Extremely rare use cases.
See: https://github.com/44smkn/toggl_exporter_serverless

Collectors

Name Description
ProjectDuration sum of time entry grouped by the project

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL