A Prometheus exporter to expose data from project management Float at float.com
3.2K
An exporter for Prometheus exposing data from project management service Float at float.com
When running on localhost, float_exporter expose metrics at http://localhost:9709/metrics
The metrics exposed by float_exporter. The label days, is the number of days beeing looked in to the future when generating a report. A metric with days="7" would cover the period from the time the data was scraped, to days days in the future.
How to configure float_exporter.
The following parameters make up the configuration of float_exporter.
float_exporter has three sources of configuration. They are the following, in order of priority.
When setting a parameter using an environment variable, you should prefix the parameter name in uppercase with the string FLOAT_. To set the access token to use you would need to specify the environment variable FLOAT_ACCESS_TOKEN.
Install float_exporter in a Kubernetes cluster from a helm chart. You are assumed to have helm running on your machine. The following will install float_exporter in the namespace default.
cd helmcp config.yaml config.local.yamlhelm install -f config.local.yml my-float-exporter ./float_exporterhelm listTo uninstall: helm uninstall my-float-exporter
To see the Kubernetes files generated by helm without installing float_exporter in your cluster,
run helm with flag --dry-run like this: helm install -f config.local.yml my-float-exporter ./float_exporter
Run float_exporter as a service in a Kubernetes cluster managed by kubectl. This section refers to files in directory k8s. All files uses namespace monitoring. If you want to use a different namespace, you can change the configuration files accordingly.
kubectl create -f fe-namespace.ymlkubectl create -f fe-secret.local.ymlkubectl create -f fe-configmap.local.ymlkubectl create -f fe-service.ymlkubectl port-forward -n monitoring service/fe-svc 9709:9709http://localhost:9709/metricsWhen running, you should see a pod, a deployment (with replicaset) and a service in the monitoring namespace:
kubectl get all -n monitoring
NAME READY STATUS RESTARTS AGE...
pod/fe-dep-xxx-xxx 1/1 Running 0 18h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/fe-svc ClusterIP xx.xx.xx.xx <none> 9709/TCP 18h
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/fe-dep 1/1 1 1 18h
NAME DESIRED CURRENT READY AGE
replicaset.apps/fe-dep-xxxx 1 1 1 18h
pip3 install -r requirements.txt./float_exporter.py ./float_exporter.local.ymlhttp://localhost:9709/metricsBuild an image with tag float_exporter.
docker build --tag float_exporter .How to run with configuration in a file.
docker run --rm -p 9709:9709 -v /example/path/float_exporter.yml:/etc/float_exporter.yml float_exporterhttp://localhost:9709/metricsIf you don't want to map an external config file to the container, you can pass environment variables for the container to use in stead of the values in the configuration file /etc/float_config.yml. Here is an example of setting the access token to be used by float_exporter.
docker run --rm --env FLOAT_ACCESS_TOKEN=****** -p 9709:9709 float_exporterYou should probably always use the flag --rm to remove the container when stopping float_exporter. If you don't do that, you will end up with a lot of unused containers. If you want to keep the log file, you should map an external directory to /var/log in the container as a volume.
Content type
Image
Digest
Size
30.3 MB
Last updated
over 6 years ago
docker pull tobiasbp/float_exporter