Git Product home page Git Product logo

workspaceone-exporter's Introduction

WorkspaceOne Prometheus Exporter

WorkspaceOne UEM Prometheus exporter

Description

This exporter is used to export WorkspaceOne UEM value to OpenMetrics format.

TODO

  • Correct api_calls metrics as it doesn't count the total amount of API calls but only one made by one Prometheus scrape
  • Validate the TAG_FILTER parsing when an empty parse filter is given
  • Add more metrics (need suggestions)

Accessing the metrics

  • Default port: 9740
  • Endpoint: /metrics

example: http://localhost:9740/metrics

Metrics

Metric Description Labels Type Implemented
api_calls The number of API calls made to the WS1 tenant none Counter
devices_number The number of devices in the WS1 tenant none Gauge
devices_os The number of devices per OS in the WS1 tenant os Gauge
devices_offline The number of devices in the WS1 tenant that are offline none Gauge
devices_online The number of devices in the WS1 tenant that are online none Gauge
tags_sum The number of tags in the WS1 tenant none Gauge
devices_online_tag The number of devices online per tag in the WS1 tenant tag, model Gauge
devices_offline_tag The number of devices offline per tag in the WS1 tenant tag, model Gauge
devices_offline_1m_tag The number of devices offline per tag in the WS1 tenant for more than the last month tag, model Gauge

Environment variables

Variable Description Type Comment
WS1_AUTH_KEY WorkspaceOne UEM user Auth Key string
WS1_TENANT_KEY WorkspaceOne UEM tenant key string
WS1_URL WorkspaceOne UEM base API URL endpoint, must finished by /API string
WS1_LGID WorkspaceOne UEM highest Group ID string
WS1_INTERVAL Interval between each WS1 check to it's enrolled devices in minutes string
TAG_PARSING Enable or disable the tag parsing string must be true of false
TAG_FILTER String to filter Tag by it string Will apply a regex filter using this string over all tags
INSECURE Enable or disable the TLS verification string must be true of false

FlowChart

graph RL
    A[Prometheus ] --> B[WorkspaceOne Exporter]
    B --> C[WorkspaceOne UEM]
Loading

Usage

Filter by Tag

You can filter the devices by tag by using the TAG_FILTER environment variable. It will enable the system to only keep the tags that contain the string you set.

Running it locally

go run ./...

Run it as a Docker container

docker build -t w1-prometheus-exporter .
docker run -d -p 9740:9740 w1-prometheus-exporter

Useful links

workspaceone-exporter's People

Contributors

christopherime avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.